[bitbake-devel] [PATCH] fetch/git: fix per-branch unpacking

Alexander Kanavin alexander.kanavin at linux.intel.com
Tue Oct 17 12:41:05 UTC 2017

On 10/17/2017 02:59 PM, David Vincent wrote:

> I don't clearly see the example I need to provide since this behavior is
> already documented in the fetcher and this patch is simply a bugfix :
> - branch
>     The git branch to retrieve from. The default is "master"
>     This option also supports multiple branch fetching, with branches
>     separated by commas.  In multiple branches case, the name option
>     must have the same number of names to match the branches, which is
>     used to specify the SRC_REV for the branch
>     e.g:
>     SRC_URI="git://some.host/somepath;branch=branchX,branchY;name=nameX,nameY"
>     SRCREV_nameX = "xxxxxxxxxxxxxxxxxxxx"
> Maybe I can provide some background behind this fix and you tell me if I must
> complete my commit message.
> When working on a linux-yocto kernel, I tried to merge a feature branch in my
> machine branch using the merge functionality, therefore I needed to checkout
> two branches in a specific revision. Problem is that my machine branch was
> correctly checked out with the SRCREV provided in the recipe but the feature
> branch was not, it was checked out to the tip of the remote branch. When
> investigating a little further, I did find that bitbake only checks out the
> first branch and does not handle other branches (why it did work in the first
> place seems like some bbclass magic to me). The point is that with this patch,
> all my branches are correctly checked out and my kernel got the good revision.

Thanks - actually Yocto documentation does not mention anything about 
multiple branches; you need to read the source code for the fetcher. So 
technically, it's not officially supported. And how do you pick a 
specific branch to be built?

Anyway, the kind of information you provided above can definitely go 
into the commit message. And can you file a bug to fix this in the docs 


More information about the bitbake-devel mailing list