]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-yocto: fix branch validation for AUTOREV, non machine_meta kernels
authorBruce Ashfield <bruce.ashfield@windriver.com>
Mon, 13 Oct 2014 03:53:59 +0000 (23:53 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Oct 2014 16:31:59 +0000 (17:31 +0100)
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@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/kernel-yocto.bbclass

index 7718f9ab1b58f5edc7e59cdf4115d70746300dfd..e672a0e3a5aa456dd92ac5aca9a90ac86aaa9ea2 100644 (file)
@@ -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