Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] buildhistory: fix incorrect command line in commit message with memres
@ 2017-06-09 13:50 Paul Eggleton
  2017-06-09 13:50 ` [PATCH 1/2] bitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELIST Paul Eggleton
  2017-06-09 13:50 ` [PATCH 2/2] classes/buildhistory: use BB_CMDLINE to get bitbake command line Paul Eggleton
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggleton @ 2017-06-09 13:50 UTC (permalink / raw)
  To: openembedded-core

Note: this depends upon the patchset I just sent to the bitbake-devel
list.


The following changes since commit 186882ca62bf683b93cd7a250963921b89ba071f:

  buildhistory: skip tests if GitPython module is missing (2017-06-07 16:00:43 +0100)

are available in the git repository at:

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

Paul Eggleton (2):
  bitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELIST
  classes/buildhistory: use BB_CMDLINE to get bitbake command line

 meta/classes/buildhistory.bbclass | 13 ++++++++-----
 meta/conf/bitbake.conf            |  2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)

-- 
2.9.4



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

* [PATCH 1/2] bitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELIST
  2017-06-09 13:50 [PATCH 0/2] buildhistory: fix incorrect command line in commit message with memres Paul Eggleton
@ 2017-06-09 13:50 ` Paul Eggleton
  2017-06-09 13:50 ` [PATCH 2/2] classes/buildhistory: use BB_CMDLINE to get bitbake command line Paul Eggleton
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2017-06-09 13:50 UTC (permalink / raw)
  To: openembedded-core

We really don't want the just-introduced BB_CMDLINE influencing the
config hash.

Part of the fix for [YOCTO #11634].

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

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 3ad905c..caae6a0 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -856,7 +856,7 @@ BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
     PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
     GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
     HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \
-    BB_SETSCENE_ENFORCE"
+    BB_SETSCENE_ENFORCE BB_CMDLINE"
 BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
     lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \
     file-checksums python func task export unexport noexec nostamp dirs cleandirs \
-- 
2.9.4



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

* [PATCH 2/2] classes/buildhistory: use BB_CMDLINE to get bitbake command line
  2017-06-09 13:50 [PATCH 0/2] buildhistory: fix incorrect command line in commit message with memres Paul Eggleton
  2017-06-09 13:50 ` [PATCH 1/2] bitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELIST Paul Eggleton
@ 2017-06-09 13:50 ` Paul Eggleton
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2017-06-09 13:50 UTC (permalink / raw)
  To: openembedded-core

We put the bitbake command line in the buildhistory commit message for
informational purposes, but calling sys.argv to get that as we were
previously doesn't really work in memory resident mode - that gives you
the command used to start the bitbake server which is much less
interesting. Use the just-introduced BB_CMDLINE variable instead.

Part of the fix for [YOCTO #11634].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/buildhistory.bbclass | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3e907fc..74b837e 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -696,11 +696,14 @@ def buildhistory_get_sdkvars(d):
 
 
 def buildhistory_get_cmdline(d):
-    if sys.argv[0].endswith('bin/bitbake'):
-        bincmd = 'bitbake'
-    else:
-        bincmd = sys.argv[0]
-    return '%s %s' % (bincmd, ' '.join(sys.argv[1:]))
+    argv = d.getVar('BB_CMDLINE', False)
+    if argv:
+        if argv[0].endswith('bin/bitbake'):
+            bincmd = 'bitbake'
+        else:
+            bincmd = argv[0]
+        return '%s %s' % (bincmd, ' '.join(argv[1:]))
+    return ''
 
 
 buildhistory_single_commit() {
-- 
2.9.4



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

end of thread, other threads:[~2017-06-09 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 13:50 [PATCH 0/2] buildhistory: fix incorrect command line in commit message with memres Paul Eggleton
2017-06-09 13:50 ` [PATCH 1/2] bitbake.conf: add BB_CMDLINE to BB_HASHCONFIG_WHITELIST Paul Eggleton
2017-06-09 13:50 ` [PATCH 2/2] classes/buildhistory: use BB_CMDLINE to get bitbake command line Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox