]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-yocto: allow branch auditing to be suspended
authorBruce Ashfield <bruce.ashfield@windriver.com>
Thu, 21 Apr 2016 15:23:45 +0000 (11:23 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 May 2016 19:52:57 +0000 (20:52 +0100)
When working on the yocto-bsp and kernel-lab update for yocto 1.2
we found it was impossible for a end-user BSP to isolate patches
on a branch, since with the following commit:

  [kernel-yocto: enforce SRC_URI specified branch]

Any new branch would be switched to whatever was specified on the
SRC_URI and undoing the work that the yocto-bsp tool did to support
board specific patches.

To fix this, we'll keep the enforcing of branch consistency enabled
by default, but introduce a variable "KMETA_AUDIT" that when not
set will skip the check.

There's no impact for existing users, and it is only something that
other plumbing commands and tools will need to use (or care about).

[YOCTO: #9120]

(From OE-Core rev: 1d4c120edeb6e45665eafd6962a10ebb89d758eb)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
meta/classes/kernel-yocto.bbclass
meta/recipes-kernel/linux/linux-yocto.inc

index f86b3ef011a3a0ca2d93c5e7c6bd7a7ea4cf9875..a9d42053da0108e7c390d338251e060f09182d02 100644 (file)
@@ -170,15 +170,20 @@ do_patch() {
                fi
        fi
 
-        current_branch=`git rev-parse --abbrev-ref HEAD`
-        machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
-        if [ "${current_branch}" != "${machine_branch}" ]; then
-            bbwarn "After meta data application, the kernel tree branch is ${current_branch}. The"
-            bbwarn "SRC_URI specified branch ${machine_branch}. The branch will be forced to ${machine_branch},"
-            bbwarn "but this means the board meta data (.scc files) do not match the SRC_URI specification."
-            bbwarn "The meta data and branch ${machine_branch} should be inspected to ensure the proper"
-            bbwarn "kernel is being built."
-            git checkout -f ${machine_branch}
+        if [ -n "${KMETA_AUDIT}" ]; then
+            current_branch=`git rev-parse --abbrev-ref HEAD`
+            machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
+            if [ "${current_branch}" != "${machine_branch}" ]; then
+                bbwarn "After meta data application, the kernel tree branch is ${current_branch}."
+                bbwarn "The SRC_URI specified branch ${machine_branch}."
+                bbwarn ""
+                bbwarn "The branch will be forced to ${machine_branch}, but this means the board meta data"
+                bbwarn "(.scc files) do not match the SRC_URI specification."
+                bbwarn ""
+                bbwarn "The meta data and branch ${machine_branch} should be inspected to ensure the proper"
+                bbwarn "kernel is being built."
+                git checkout -f ${machine_branch}
+            fi
         fi
 
        if [ "${machine_srcrev}" != "AUTOINC" ]; then
index 6b161fc064becf6e8a4f9700f0a10c4d1c1c02c4..bd915704422823c61f1313fcb22494ed8b75baa3 100644 (file)
@@ -35,6 +35,7 @@ SRCREV_FORMAT ?= "meta_machine"
 #   2: report options that are not hardware related, but set by a BSP
 KCONF_AUDIT_LEVEL ?= "1"
 KCONF_BSP_AUDIT_LEVEL ?= "0"
+KMETA_AUDIT ?= "yes"
 
 LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"