summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-06-09 15:50:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 15:08:31 +0100
commit4d1866bd28ddb6a951a9502bc09767221266745a (patch)
tree95cb6473065fa29118b502b8518a31d542a46fad /meta/classes/buildhistory.bbclass
parent120810c50821919fd231cbd6d63cf27f67338f7a (diff)
downloadpoky-4d1866bd28ddb6a951a9502bc09767221266745a.tar.gz
classes/buildhistory: use BB_CMDLINE to get bitbake command line
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]. (From OE-Core rev: 1a6424ee4c865601ff324e9599a2f48c9e6723ee) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-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):
696 696
697 697
698def buildhistory_get_cmdline(d): 698def buildhistory_get_cmdline(d):
699 if sys.argv[0].endswith('bin/bitbake'): 699 argv = d.getVar('BB_CMDLINE', False)
700 bincmd = 'bitbake' 700 if argv:
701 else: 701 if argv[0].endswith('bin/bitbake'):
702 bincmd = sys.argv[0] 702 bincmd = 'bitbake'
703 return '%s %s' % (bincmd, ' '.join(sys.argv[1:])) 703 else:
704 bincmd = argv[0]
705 return '%s %s' % (bincmd, ' '.join(argv[1:]))
706 return ''
704 707
705 708
706buildhistory_single_commit() { 709buildhistory_single_commit() {