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.