summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-06-09 15:13:09 +0200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-06-09 15:46:47 +0200
commit84c62c20eb28477836a756fbaa71fb6c2e4d7343 (patch)
tree1c68f118f3244f69da6b3f9e07d7a8b6cc474d36
parent71df198271dfdce83e3141330844cb999e7982b6 (diff)
downloadopenembedded-core-contrib-paule/buildhistory-cmdline-memres.tar.gz
openembedded-core-contrib-paule/buildhistory-cmdline-memres.tar.bz2
openembedded-core-contrib-paule/buildhistory-cmdline-memres.zip
classes/buildhistory: use BB_CMDLINE to get bitbake command linepaule/buildhistory-cmdline-memres
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>
-rw-r--r--meta/classes/buildhistory.bbclass13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3e907fc3f9..74b837e974 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() {