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

Bruce Ashfield bruce.ashfield at gmail.com
Sat Apr 11 03:27:26 UTC 2015


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.

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"



More information about the Openembedded-core mailing list