Q:

When is the semidirect product of principal fiber bundles a fiber bundle

Let $P_{H}$ be a principal bundle over a manifold $M$ with fiber the Lie group $H$ and let $P_{G}$ be a principal bundle with fiber the Lie group $G$ over the same manifold $M$. Let $h_{ab}\colon U_{ab}\to H$ and $g_{ab}\colon U_{ab}\to G$ be the corresponding $\check{\mathrm{C}}$ech cocycles (rather, some representatives), where $U_{ab}$ denotes the non-empty intersection of open sets in a common trivializing open cover $\mathcal{U}$ of $M$. Let $\tau\colon H \to Aut(G)$ be an homomorphism, so we can consider the semidirect product $G\rtimes_{\tau} H$. I was trying to build the "semidirect product bundle" of $P_{H}$ and $P_{G}$ by taking the "pointwise" semidirect product of $g_{ab}$ and $h_{ab}$. In other words, I take $\mathcal{U}$ and define a new bundle $P_{G\rtimes H}$ by the following transition functions:
$\tilde{g}_{ab} = (g_{ab},h_{ab})\colon U_{ab} \to G\rtimes_{\tau} H$.
However, $\tilde{g}_{ab}$ does not satisfy the cocycle condition. Is there any sensible way to define the semidirect product of two principal bundles?
Thanks.

A:

I don't think so unless $M$ has the homotopy type of a sphere (or more generally, the suspension of a based space): there is a fibration of classifying spaces
$$
BG \to B(G\rtimes H) \to BH\, .
$$
This comes from the (split) short exact sequence $1\to G\to G\rtimes H \to H\to 1$. 
One of your bundles is classified by a map $M \to BG$ and your other one by a map $M \to BH$. Pushforward the first map and apply the section to the second one to get a pair of maps $f,g: M \to B(G\rtimes H)$.  
If we could add these maps then you would have a model for the semi-direct product bundle. If $M$ is a homotopy sphere this is clear since homotopy classes maps out of a sphere form a group.

