summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2017-02-01 10:30:29 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-05 09:20:20 +0000
commita0059ebbb52c659282e355664bba1a2fa282170e (patch)
treeb77b27f7016a31d937a0e75e3fc59497f753eabf /meta/classes
parent460071785c58de6d45698046e70f1121438537cd (diff)
downloadopenembedded-core-a0059ebbb52c659282e355664bba1a2fa282170e.tar.gz
openembedded-core-a0059ebbb52c659282e355664bba1a2fa282170e.tar.bz2
openembedded-core-a0059ebbb52c659282e355664bba1a2fa282170e.zip
kern-tools: re-enable scc merge command
The ability to merge two branches directly from a .scc file was dropped during the streamlining of the tools. As was pointed out by David Vincent <freesilicon@gmail.com>, there is once again a valid use case for this functionality, so we restore the capability. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel-yocto.bbclass16
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 5cfd8aff50..36f61c5694 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -148,7 +148,7 @@ do_kernel_metadata() {
# run1: pull all the configuration fragments, no matter where they come from
elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`"
if [ -n "${elements}" ]; then
- scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
+ scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
if [ $? -ne 0 ]; then
bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
fi
@@ -165,6 +165,7 @@ do_kernel_metadata() {
}
do_patch() {
+ set +e
cd ${S}
check_git_config
@@ -177,6 +178,19 @@ do_patch() {
bbfatal_log "Patch failures can be resolved in the linux source directory ${S})"
fi
fi
+
+ if [ -f "${meta_dir}/merge.queue" ]; then
+ # we need to merge all these branches
+ for b in $(cat ${meta_dir}/merge.queue); do
+ git show-ref --verify --quiet refs/heads/${b}
+ if [ $? -eq 0 ]; then
+ bbnote "Merging branch ${b}"
+ git merge -q --no-ff -m "Merge branch ${b}" ${b}
+ else
+ bbfatal "branch ${b} does not exist, cannot merge"
+ fi
+ done
+ fi
}
do_kernel_checkout() {