summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2012-08-22 05:18:05 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-28 15:53:04 (GMT)
commit33921847a2dd6d9d6e382b55337492e97ebc666b (patch)
treeff0d888090ec8f34deaa79ed9ac799866eb45dbe /meta/classes
parent5427f5d70f188c9bd4cc22795560ae967ff766d4 (diff)
downloadpoky-33921847a2dd6d9d6e382b55337492e97ebc666b.tar.gz
kernel-yocto: set master branch to a defined SRCREV
To support custom repositories that set a SRCREV and that only have a single master branch, do_validate_branches needs a special case for 'master'. We can't delete and recreate the branch, since you cannot delete the current branch, instead we must reset the branch to the proper SRCREV. (From OE-Core rev: 3a8dc0a01d2756bb8f51afccad772fca1dc48af3) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel-yocto.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index d859d76..e6758cf 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -270,11 +270,15 @@ do_validate_branches() {
270 # SRCREV (if it isn't the current HEAD of that branch) 270 # SRCREV (if it isn't the current HEAD of that branch)
271 git checkout -q master 271 git checkout -q master
272 for b in $containing_branches; do 272 for b in $containing_branches; do
273 branch_head=`git show-ref -s --heads ${b}` 273 branch_head=`git show-ref -s --heads ${b}`
274 if [ "$branch_head" != "$target_branch_head" ]; then 274 if [ "$branch_head" != "$target_branch_head" ]; then
275 echo "[INFO] Setting branch $b to ${target_branch_head}" 275 echo "[INFO] Setting branch $b to ${target_branch_head}"
276 git branch -D $b > /dev/null 276 if [ "$b" == "master" ]; then
277 git branch $b $target_branch_head > /dev/null 277 git reset --hard $target_branch_head > /dev/null
278 else
279 git branch -D $b > /dev/null
280 git branch $b $target_branch_head > /dev/null
281 fi
278 fi 282 fi
279 done 283 done
280 284