]> code.ossystems Code Review - openembedded-core.git/commit
kernel-yocto: Simplify no git repo case in do_kernel_checkout
authorPaul Barker <paul@pbarker.dev>
Mon, 2 Aug 2021 10:44:30 +0000 (11:44 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Aug 2021 09:37:29 +0000 (10:37 +0100)
commitaf2a9c92d4498492ca23388c7b4bbed48abdc4d7
tree2f8f2055ea8a0a45cc0c050146088f0ff326e4d7
parentcffa5930d86a464aceb4764eec510a2b8f5c44a1
kernel-yocto: Simplify no git repo case in do_kernel_checkout

If the kernel sources are not fetched via git, a local git repository is
created in do_kernel_checkout. In this case we know that there will be
no remote branches and we will already be on the correct branch (since
only one branch will exist). So we can simplify things by skipping these
steps.

This also removes the assumption that the default git branch name will
be "master". Prior to this change, the final git checkout command in
do_kernel_checkout could fail if a local git repo was created and the
user had changed init.defaultBranch in their gitconfig.

Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-yocto.bbclass