All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Misc OE-Core fixes
@ 2017-11-03  3:16 Paul Eggleton
  2017-11-03  3:16 ` [PATCH 1/3] lib/oe/sstatesig: fix wildcard matching wrong task signature files Paul Eggleton
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Paul Eggleton @ 2017-11-03  3:16 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 3b413a80578caacd9a7f405f3c51a3921d78a60d:

  README.qemu: qemuppc64 is not supported (2017-10-16 23:54:27 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/core-fixes
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/core-fixes

Paul Eggleton (3):
  lib/oe/sstatesig: fix wildcard matching wrong task signature files
  buildhistory: enable committing history by default
  scripts/send-pull-request: allow -C to be used multiple times

 meta/classes/buildhistory.bbclass | 2 +-
 meta/lib/oe/sstatesig.py          | 2 +-
 scripts/send-pull-request         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.9.5



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] lib/oe/sstatesig: fix wildcard matching wrong task signature files
  2017-11-03  3:16 [PATCH 0/3] Misc OE-Core fixes Paul Eggleton
@ 2017-11-03  3:16 ` Paul Eggleton
  2017-11-03  3:16 ` [PATCH 2/3] buildhistory: enable committing history by default Paul Eggleton
  2017-11-03  3:16 ` [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times Paul Eggleton
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2017-11-03  3:16 UTC (permalink / raw)
  To: openembedded-core

With a '*' as a wildcard for the signature here we can also match a
portion of the task name with the result that we may match a sigdata
file for the wrong task. Luckily the signature is always the same
length - 32 characters - so we can simply use 32 '?' characters instead.
(A regex would have been another alternative, but the wildcard should be
effective and I felt like a regex would complicate the code more than
this solution).

Fixes [YOCTO #11763].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oe/sstatesig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 5a40932..3a8778e 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -320,7 +320,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
 
     if not taskhashlist or (len(filedates) < 2 and not foundall):
         # That didn't work, look in sstate-cache
-        hashes = taskhashlist or ['*']
+        hashes = taskhashlist or ['?' * 32]
         localdata = bb.data.createCopy(d)
         for hashval in hashes:
             localdata.setVar('PACKAGE_ARCH', '*')
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] buildhistory: enable committing history by default
  2017-11-03  3:16 [PATCH 0/3] Misc OE-Core fixes Paul Eggleton
  2017-11-03  3:16 ` [PATCH 1/3] lib/oe/sstatesig: fix wildcard matching wrong task signature files Paul Eggleton
@ 2017-11-03  3:16 ` Paul Eggleton
  2017-11-03  3:16 ` [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times Paul Eggleton
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2017-11-03  3:16 UTC (permalink / raw)
  To: openembedded-core

The most common usage for buildhistory is with commits enabled so that
you actually collect history, rather than just keeping a snapshot of the
most recent build state, therefore default BUILDHISTORY_COMMIT to "1".
This really ought to have been the default in the beginning, I can't
really explain why it wasn't.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/buildhistory.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 7a5534e..63980f7 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -37,7 +37,7 @@ BUILDHISTORY_OLD_DIR_PACKAGE = "${BUILDHISTORY_OLD_DIR}/packages/${MULTIMACH_TAR
 BUILDHISTORY_DIR_SDK = "${BUILDHISTORY_DIR}/sdk/${SDK_NAME}${SDK_EXT}/${IMAGE_BASENAME}"
 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
 BUILDHISTORY_SDK_FILES ?= "conf/local.conf conf/bblayers.conf conf/auto.conf conf/locked-sigs.inc conf/devtool.conf"
-BUILDHISTORY_COMMIT ?= "0"
+BUILDHISTORY_COMMIT ?= "1"
 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
 BUILDHISTORY_PUSH_REPO ?= ""
 
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times
  2017-11-03  3:16 [PATCH 0/3] Misc OE-Core fixes Paul Eggleton
  2017-11-03  3:16 ` [PATCH 1/3] lib/oe/sstatesig: fix wildcard matching wrong task signature files Paul Eggleton
  2017-11-03  3:16 ` [PATCH 2/3] buildhistory: enable committing history by default Paul Eggleton
@ 2017-11-03  3:16 ` Paul Eggleton
  2017-11-04  0:50   ` Peter Kjellerstedt
  2 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2017-11-03  3:16 UTC (permalink / raw)
  To: openembedded-core

Allow -C to be specified multiple times in order to CC multiple people
instead of only taking the last specified value. (You can already use
commas to separate multiple recipients, but it makes sense to support
this usage as well as commas as separators may not be immediately
obvious).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/send-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 883deac..baa907d 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -82,7 +82,7 @@ while getopts "acC:hp:t:" OPT; do
 		GITSOBCC="--signed-off-by-cc"
 		;;
 	C)
-		EXTRA_CC="$OPTARG"
+		EXTRA_CC="$EXTRA_CC,$OPTARG"
 		;;
 	h)
 		usage
-- 
2.9.5



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times
  2017-11-03  3:16 ` [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times Paul Eggleton
@ 2017-11-04  0:50   ` Peter Kjellerstedt
  2017-11-05 21:12     ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-11-04  0:50 UTC (permalink / raw)
  To: Paul Eggleton, openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Paul Eggleton
> Sent: den 3 november 2017 04:16
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 3/3] scripts/send-pull-request: allow -C to
> be used multiple times
> 
> Allow -C to be specified multiple times in order to CC multiple people
> instead of only taking the last specified value. (You can already use
> commas to separate multiple recipients, but it makes sense to support
> this usage as well as commas as separators may not be immediately
> obvious).
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  scripts/send-pull-request | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index 883deac..baa907d 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -82,7 +82,7 @@ while getopts "acC:hp:t:" OPT; do
>  		GITSOBCC="--signed-off-by-cc"
>  		;;
>  	C)
> -		EXTRA_CC="$OPTARG"
> +		EXTRA_CC="$EXTRA_CC,$OPTARG"

That will introduce a leading comma in $EXTRA_CC, which in turn will 
lead to a --cc='' option being passed to git send-email. You can avoid 
that by doing:

		EXTRA_CC="${EXTRA_CC:+$EXTRA_CC,}$OPTARG"

>  		;;
>  	h)
>  		usage
> --
> 2.9.5

You can also rewrite the case statement for -t in a similar way:

	t)
		TO="${TO:+$TO,}$OPTARG"
		;;

Similarly, you can rewrite the code that assigns AUTO_CC in 
harvest_recipients() as:

				AUTO_CC="${AUTO_CC:+$AUTO_CC,}$EMAIL"

And if you replace:

unset TO

near the beginning of the script with:

TO=$(git config sendmail.to)

you can remove everything related to AUTO_TO.

//Peter



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times
  2017-11-04  0:50   ` Peter Kjellerstedt
@ 2017-11-05 21:12     ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2017-11-05 21:12 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: openembedded-core

Hi Peter,

On Saturday, 4 November 2017 1:50:21 PM NZDT Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Paul Eggleton
> > Sent: den 3 november 2017 04:16
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 3/3] scripts/send-pull-request: allow -C to
> > be used multiple times
> > 
> > Allow -C to be specified multiple times in order to CC multiple people
> > instead of only taking the last specified value. (You can already use
> > commas to separate multiple recipients, but it makes sense to support
> > this usage as well as commas as separators may not be immediately
> > obvious).
> > 
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > ---
> >  scripts/send-pull-request | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> > index 883deac..baa907d 100755
> > --- a/scripts/send-pull-request
> > +++ b/scripts/send-pull-request
> > @@ -82,7 +82,7 @@ while getopts "acC:hp:t:" OPT; do
> >  		GITSOBCC="--signed-off-by-cc"
> >  		;;
> >  	C)
> > -		EXTRA_CC="$OPTARG"
> > +		EXTRA_CC="$EXTRA_CC,$OPTARG"
> 
> That will introduce a leading comma in $EXTRA_CC, which in turn will 
> lead to a --cc='' option being passed to git send-email. You can avoid 
> that by doing:

Sure, but I did test this and that didn't appear to have any ill effect. I 
agree that it's tidier not to be passing such options to git though, so I'll 
send a v2.


> You can also rewrite the case statement for -t in a similar way:
> 
> 	t)
> 		TO="${TO:+$TO,}$OPTARG"
> 		;;
> 
> Similarly, you can rewrite the code that assigns AUTO_CC in 
> harvest_recipients() as:
> 
> 				AUTO_CC="${AUTO_CC:+$AUTO_CC,}$EMAIL"
> 
> And if you replace:
> 
> unset TO
> 
> near the beginning of the script with:
> 
> TO=$(git config sendmail.to)
> 
> you can remove everything related to AUTO_TO.

I'm not sure I'll get to this, but if I don't perhaps you could?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-05 21:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03  3:16 [PATCH 0/3] Misc OE-Core fixes Paul Eggleton
2017-11-03  3:16 ` [PATCH 1/3] lib/oe/sstatesig: fix wildcard matching wrong task signature files Paul Eggleton
2017-11-03  3:16 ` [PATCH 2/3] buildhistory: enable committing history by default Paul Eggleton
2017-11-03  3:16 ` [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times Paul Eggleton
2017-11-04  0:50   ` Peter Kjellerstedt
2017-11-05 21:12     ` Paul Eggleton

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.