All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: David Vincent <freesilicon@gmail.com>,
	Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Yocto Project Discussion <yocto@yoctoproject.org>
Subject: Re: [yocto-kernel-tools][PATCH 0/1] Rework merge of feature branches
Date: Fri, 3 Feb 2017 13:51:34 -0500	[thread overview]
Message-ID: <503ef641-856e-a831-d39e-2c33b3b2440d@windriver.com> (raw)
In-Reply-To: <1710687.9RfHKcS4U3@crde-port-20.cahors.local>

[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]

On 2017-02-03 03:42 AM, David Vincent wrote:
> On dimanche 29 janvier 2017 23:31:49 CET Bruce Ashfield wrote:
>> On Wed, Jan 25, 2017 at 1:05 PM, Bruce Ashfield <bruce.ashfield@gmail.com>
>> wrote:
>>
>> I spent Friday looking into this in more detail, and to keep things
>> consistent
>> with how the path and config queues are handled, with all the tree
>> manipulations
>> pull out of the various scripts and exposed in the bbclass itself, I ended
>> up with
>> a different implementation of the support.
>>
>> The kern-tools change is the same as you did (and is your change), the
>> difference
>> is in the bbclass processing, where do_patch() modifies the tree, and it
>> consumes
>> the output of the meta-data routine .. versus the kgit-meta script itself.
> Thanks for looking into this and come up with a better implementation. I agree
> that mine was a little harsh.
>> The work can be seen in my poky-contrib tree:
>>
>> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=zedd/kernel,
>> in the
>> commit "kern-tools: re-enable scc merge command".
>>
>> These changes are on master, and passed my testing to merge feature branches
>> into the branch being built.
> Saw it, read it and saw that it was now in master-next, ready to be pulled.
>>
>> If you are able to try it out (on master), that would be great. I'm going
>> to let it
>> soak for a few days, and once it merges to master, it can be ported to
>> morty.
> Sorry, I don't have a master build ready but as soon as I can test it whether
> on morty or master, I will report back.

I was able to merge branches with this patch applied to Morty.

Cheers,

Bruce

>
> David
>


[-- Attachment #2: 0001-kern-tools-re-enable-scc-merge-command.patch --]
[-- Type: text/x-patch, Size: 2789 bytes --]

From 8e08efa4b567e58386247575ae28835841f484c0 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Wed, 25 Jan 2017 13:29:34 -0500
Subject: [PATCH] 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>
---
 meta/classes/kernel-yocto.bbclass                       | 16 +++++++++++++++-
 meta/recipes-kernel/kern-tools/kern-tools-native_git.bb |  3 ++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index a60327a..eb35dce 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() {
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 8af0155..aa27ec8 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,8 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=a6c2fa8aef1b
 
 DEPENDS = "git-native"
 
-SRCREV = "85564e69555b713c2759d58ec5ade54424d051d8"
+SRCREV = "c14440d4e7ae0160c260ed65c3e123be5dc97ae8"
+
 PR = "r12"
 PV = "0.2+git${SRCPV}"
 
-- 
2.7.4


  parent reply	other threads:[~2017-02-03 18:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 10:37 [yocto-kernel-tools][PATCH 0/1] Rework merge of feature branches David Vincent
2017-01-25 10:37 ` [yocto-kernel-tools][PATCH 1/1] scc: Move merge command David Vincent
2017-01-25 18:05 ` [yocto-kernel-tools][PATCH 0/1] Rework merge of feature branches Bruce Ashfield
2017-01-26  8:38   ` [PATCH] kernel-yocto: Update source tree with kgit-meta David Vincent
2017-01-27 15:09     ` Bruce Ashfield
2017-01-30  4:31   ` [yocto-kernel-tools][PATCH 0/1] Rework merge of feature branches Bruce Ashfield
2017-02-03  8:42     ` David Vincent
2017-02-03 14:18       ` Bruce Ashfield
2017-02-03 18:51       ` Bruce Ashfield [this message]
2017-02-07 11:21         ` David Vincent
2017-02-07 14:00           ` Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=503ef641-856e-a831-d39e-2c33b3b2440d@windriver.com \
    --to=bruce.ashfield@windriver.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=freesilicon@gmail.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.