summaryrefslogtreecommitdiff
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2011-05-16 11:42:28 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-17 14:38:52 +0100
commitb4f1845f7cf42059984112e3f41a323b4c9d6dfd (patch)
tree70de03c0baf4a7c23c459c40caee246bc85b0935 /meta/classes/kernel-yocto.bbclass
parentfc626a1badc8260ac8f4d44db5c40a6072d3956c (diff)
downloadopenembedded-core-b4f1845f7cf42059984112e3f41a323b4c9d6dfd.tar.gz
openembedded-core-b4f1845f7cf42059984112e3f41a323b4c9d6dfd.tar.bz2
openembedded-core-b4f1845f7cf42059984112e3f41a323b4c9d6dfd.tar.xz
openembedded-core-b4f1845f7cf42059984112e3f41a323b4c9d6dfd.zip
linux-yocto: detect and avoid branch revision checking for AUTOREV
When a BSP or layer specifies an AUTOREV for SRCREV, the logic that matches expected vs real branch heads doesn't apply. We always want the latest. To solve the issues with invalid git revs causing validation failures, we detect the AUTOINC value and do a early return, skipping validation. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r--meta/classes/kernel-yocto.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 818a07e21..536434fdf 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -136,6 +136,13 @@ do_validate_branches() {
return
fi
+ # nothing to do if SRCREV=${AUTOREV}
+ if [ "${SRCREV_machine}" = "AUTOINC" ]; then
+ # restore the branch for builds
+ git checkout -f ${KBRANCH}
+ return
+ fi
+
branch_head=`git show-ref -s --heads ${KBRANCH}`
meta_head=`git show-ref -s --heads ${KMETA}`
target_branch_head="${SRCREV_machine}"