summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2014-03-18 21:41:29 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-01 14:34:27 +0100
commit2ffa3f8be6996877cd552ff22260de35c19c413d (patch)
treecc11e1ed125e9085ad572c4263e146c8ae395dec
parent04bd4cee625574cfa67679b6b2a150a21106c5bf (diff)
downloadopenembedded-core-contrib-2ffa3f8be6996877cd552ff22260de35c19c413d.tar.gz
openembedded-core-contrib-2ffa3f8be6996877cd552ff22260de35c19c413d.tar.bz2
openembedded-core-contrib-2ffa3f8be6996877cd552ff22260de35c19c413d.zip
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. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--meta/classes/kernel-yocto.bbclass11
1 files changed, 5 insertions, 6 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 9209f423cf..69620f0a42 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -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}"