[oe-commits] Bruce Ashfield : kernel-yocto: fix branch validation for AUTOREV, non machine_meta kernels
git at git.openembedded.org
git at git.openembedded.org
Fri Oct 24 16:37:07 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 212a4bd9b086365c022842a2ac6a2a25bd486002
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=212a4bd9b086365c022842a2ac6a2a25bd486002
Author: Bruce Ashfield <bruce.ashfield at windriver.com>
Date: Sun Oct 12 23:53:59 2014 -0400
kernel-yocto: fix branch validation for AUTOREV, non machine_meta kernels
The simplication of do_validate_branches missed a case where a custom
kernel can supply SRCREV="${AUTOREV}", and not use SRCREV_machine at all.
In this case, we will incorrectly try and test the tree for a non-existent
commit, and break the build.
By simplying the condition of the check to look for an empty SRCREV_machine,
we can skip manipulating the tree and testing for a SRCREV.
Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/kernel-yocto.bbclass | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 7718f9a..e672a0e 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -288,12 +288,14 @@ do_validate_branches() {
# check and we can exit early
if [ "${machine_srcrev}" = "AUTOINC" ]; then
bbnote "SRCREV validation is not required for AUTOREV"
- elif [ "${machine_srcrev}" = "" ] && [ "${SRCREV}" != "AUTOINC" ]; then
- # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe
- # that doesn't use the SRCREV_FORMAT "machine_meta" is being built. In
- # this case, we need to reset to the give SRCREV before heading to patching
- bbnote "custom recipe is being built, forcing SRCREV to ${SRCREV}"
- force_srcrev="${SRCREV}"
+ elif [ "${machine_srcrev}" = "" ]; then
+ if [ "${SRCREV}" != "AUTOINC" ]; then
+ # SRCREV_machine_<MACHINE> was not set. This means that a custom recipe
+ # that doesn't use the SRCREV_FORMAT "machine_meta" is being built. In
+ # this case, we need to reset to the give SRCREV before heading to patching
+ bbnote "custom recipe is being built, forcing SRCREV to ${SRCREV}"
+ force_srcrev="${SRCREV}"
+ fi
else
git cat-file -t ${machine_srcrev} > /dev/null
if [ $? -ne 0 ]; then
More information about the Openembedded-commits
mailing list