diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-04-21 11:23:45 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-09 08:03:57 +0100 |
commit | 1d4c120edeb6e45665eafd6962a10ebb89d758eb (patch) | |
tree | 3ecff341c4d8b7187e7f2ef1ca92c13971587462 /meta/classes/kernel-yocto.bbclass | |
parent | 92ba77bea59a33b0ddbd5db36e2a1b42e8fd7190 (diff) | |
download | openembedded-core-1d4c120edeb6e45665eafd6962a10ebb89d758eb.tar.gz openembedded-core-1d4c120edeb6e45665eafd6962a10ebb89d758eb.tar.bz2 openembedded-core-1d4c120edeb6e45665eafd6962a10ebb89d758eb.zip |
kernel-yocto: allow branch auditing to be suspended
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]
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index f86b3ef011..a9d42053da 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass @@ -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 |