kernel-yocto: clean overly complex branch checkout

Since the git fetcher ensures that branches exist, we no longer need to
validate the branch and have a conditional checkout of the source.

We can remove some checks and ensure that whenever we exit the
do_kernel_checkout routine that a branch is always checked out.

(From OE-Core rev: 2ffa3f8be6996877cd552ff22260de35c19c413d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Bruce Ashfield
2014-03-18 21:41:29 -04:00
committed by Richard Purdie
parent 2aa75224b5
commit ba7614b0e6

View File

@@ -221,17 +221,16 @@ do_kernel_checkout() {
fi
fi
machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
# 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
# checkout and clobber any unimportant files
git checkout -f ${machine_branch}
else
echo "Not checking out ${machine_branch}, it will be created later"
git checkout -f master
machine_branch = "master"
fi
# checkout and clobber any unimportant files
git checkout -f ${machine_branch}
}
do_kernel_checkout[dirs] = "${S}"