Skip to contentSkip to conversation

Misc OE-Core fixes

PATCH In review Paul Eggleton 2 participants 6 messages Nov 3, 2017 – Nov 5, 2017

lore
Share & tools
lore
#0 lore raw

cover Misc OE-Core fixes

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(-)
Signature · 1 line
2.9.5
#1 lore raw

PATCH 1/3 lib/oe/sstatesig: fix wildcard matching wrong task signature files

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].

---
 meta/lib/oe/sstatesig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/sstatesig.py +1 -1
index 5a40932..3a8778e 100644
@@ -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', '*')
Signature · 1 line
2.9.5
#2 lore raw

PATCH 2/3 buildhistory: enable committing history by default

In reply to Paul Eggleton

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.

---
 meta/classes/buildhistory.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/buildhistory.bbclass +1 -1
index 7a5534e..63980f7 100644
@@ -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 ?= ""
 
Signature · 1 line
2.9.5
#3 lore raw

PATCH 3/3 scripts/send-pull-request: allow -C to be used multiple times

In reply to Paul Eggleton

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).

---
 scripts/send-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/send-pull-request +1 -1
index 883deac..baa907d 100755
@@ -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
Signature · 1 line
2.9.5
#4 lore raw

Re: [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times

Quoted 25 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Paul Eggleton
Sent: den 3 november 2017 04:16
To: [email protected]
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).

---
 scripts/send-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/send-pull-request +0 -0
index 883deac..baa907d 100755

scripts/send-pull-request while getopts "acC:hp:t:" OPT; do · line 85

Quoted 5 lines
scripts/send-pull-request +1 -1
@@ -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"
Quoted 5 lines
scripts/send-pull-request +0 -1
 		;;
 	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

#5 lore raw

Re: [PATCH 3/3] scripts/send-pull-request: allow -C to be used multiple times

Hi Peter,

Quoted 20 lines · NZDT Peter Kjellerstedt
Quoted 20 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Paul Eggleton
Sent: den 3 november 2017 04:16
To: [email protected]
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).

---
 scripts/send-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

scripts/send-pull-request while getopts "acC:hp:t:" OPT; do · line 85

Quoted 10 lines
scripts/send-pull-request +1 -1
index 883deac..baa907d 100755
@@ -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.

Quoted 13 lines

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:

Quoted 7 lines

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

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre