summaryrefslogtreecommitdiffstats
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:22:17 +0000
commit80a74318de40be4648d0aa69e1e44db754e5be89 (patch)
tree9e325ad76d29ba728eb998990d72f52c6788ee80
parent69083a1a1e73333f34b047a73ef5228dcc3384bd (diff)
downloadpoky-80a74318de40be4648d0aa69e1e44db754e5be89.tar.gz
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. (From OE-Core rev: a0059ebbb52c659282e355664bba1a2fa282170e) 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>
-rw-r--r--meta/classes/kernel-yocto.bbclass16
-rw-r--r--meta/recipes-kernel/kern-tools/kern-tools-native_git.bb2
2 files changed, 16 insertions, 2 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() {
148 # run1: pull all the configuration fragments, no matter where they come from 148 # run1: pull all the configuration fragments, no matter where they come from
149 elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`" 149 elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`"
150 if [ -n "${elements}" ]; then 150 if [ -n "${elements}" ]; then
151 scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES} 151 scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
152 if [ $? -ne 0 ]; then 152 if [ $? -ne 0 ]; then
153 bbfatal_log "Could not generate configuration queue for ${KMACHINE}." 153 bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
154 fi 154 fi
@@ -165,6 +165,7 @@ do_kernel_metadata() {
165} 165}
166 166
167do_patch() { 167do_patch() {
168 set +e
168 cd ${S} 169 cd ${S}
169 170
170 check_git_config 171 check_git_config
@@ -177,6 +178,19 @@ do_patch() {
177 bbfatal_log "Patch failures can be resolved in the linux source directory ${S})" 178 bbfatal_log "Patch failures can be resolved in the linux source directory ${S})"
178 fi 179 fi
179 fi 180 fi
181
182 if [ -f "${meta_dir}/merge.queue" ]; then
183 # we need to merge all these branches
184 for b in $(cat ${meta_dir}/merge.queue); do
185 git show-ref --verify --quiet refs/heads/${b}
186 if [ $? -eq 0 ]; then
187 bbnote "Merging branch ${b}"
188 git merge -q --no-ff -m "Merge branch ${b}" ${b}
189 else
190 bbfatal "branch ${b} does not exist, cannot merge"
191 fi
192 done
193 fi
180} 194}
181 195
182do_kernel_checkout() { 196do_kernel_checkout() {
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 9e3e968a46..4b1de5752c 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1b
4 4
5DEPENDS = "git-native" 5DEPENDS = "git-native"
6 6
7SRCREV = "bf2942f7559d114e96f7c7f1287bf7e5120632a3" 7SRCREV = "c14440d4e7ae0160c260ed65c3e123be5dc97ae8"
8PR = "r12" 8PR = "r12"
9PV = "0.2+git${SRCPV}" 9PV = "0.2+git${SRCPV}"
10 10