[OE-core] [PATCH] Do not always checkout master branch in the kernel repository

Bruce Ashfield bruce.ashfield at gmail.com
Sat Apr 11 04:30:43 UTC 2015


On Fri, Apr 10, 2015 at 11:27 PM, Bruce Ashfield
<bruce.ashfield at gmail.com> wrote:
> On Fri, Apr 10, 2015 at 9:17 PM, Arun Bharadwaj <arun at gumstix.com> wrote:
>> It seems like we are checking if a particular branch exists and
>> then we still go ahead and set the machine_branch as master.
>> This doesn't seem correct to me as it would work only for
>> repositories which contain a branch called "master" but would
>> fail in other cases.
>
> In kernel checkout, we are simply creating the tree from a bare clone, or
> a reference clone. So in fact, we do want to want to check out a consistent
> branch to bring the working files into existence.
>
> Anyone building a repository without master is already using a fairly
> broken workflow .. so I'm not particularly concerned about that case.
>
> I have an whole set of pending changes to linux-yocto, so I'll grab this
> and throw it on my queue.

I knew this looked familiar. We already have this changed in master:

    kernel-yocto.bbclass: Bug Fix inside do_kernel_checkout()

     After we check the existence of 'machine_branch' with 'git show-ref'
     the following if statement should change the 'machine_branch'
     to the default (i.e. master) if the 'git show-ref' has returned a
     exit code that is not 0, not the other way around.

     Signed-off-by: Theodor Gherzan <theodor at resin.io>

(oe-core commit: cc95da21914d08bfbf1936830985f824e8813904)

So you must be running an older release (this wasn't a significant issue, so
it hasn't been backported).

Cheers,

Bruce

>
> Cheers,
>
> Bruce
>
>> ---
>>  meta/classes/kernel-yocto.bbclass | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
>> index f42a5c2..410a6e8 100644
>> --- a/meta/classes/kernel-yocto.bbclass
>> +++ b/meta/classes/kernel-yocto.bbclass
>> @@ -211,7 +211,7 @@ do_kernel_checkout() {
>>         # Create a working tree copy of the kernel by checking out a branch
>>         machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
>>         git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
>> -       if [ $? -eq 0 ]; then
>> +       if [ $? -ne 0 ]; then
>>                 machine_branch="master"
>>         fi
>>
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



More information about the Openembedded-core mailing list