[oe-commits] [bitbake] branch 1.34 updated: cooker: add BB_CMDLINE to enable access to UI command line with memres
git at git.openembedded.org
git at git.openembedded.org
Thu Sep 21 16:20:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch 1.34
in repository bitbake.
The following commit(s) were added to refs/heads/1.34 by this push:
new 85596c9 cooker: add BB_CMDLINE to enable access to UI command line with memres
85596c9 is described below
commit 85596c9af3bb6407159c6c8de229cbe275aa74ea
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Fri Jun 9 15:34:46 2017 +0200
cooker: add BB_CMDLINE to enable access to UI command line with memres
In OpenEmbedded's buildhistory class we want access to the bitbake
command line that launched the build, and up to now we were simply using
sys.argv from within the event handler to get that. Unfortunately that
doesn't work in memory resident mode, since the event handler is
naturally executing within the server and thus will give you the command
that launched the bitbake server which is much less interesting. Add a
dynamic variable BB_CMDLINE to provide access to this, set from sys.argv
within the UI process in updateToServer().
(Note that BB_CMDLINE isn't currently passed through to the worker, so
this is only really readable from event handlers plus any explicit
getVariable calls - in theory an observe-only UI could read it for
example.)
Part of the fix for [YOCTO #11634].
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/command.py | 3 ++-
lib/bb/cooker.py | 7 ++++++-
lib/bb/cookerdata.py | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/bb/command.py b/lib/bb/command.py
index ab51d8e..a919f58 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -310,7 +310,8 @@ class CommandsSync:
def updateConfig(self, command, params):
options = params[0]
environment = params[1]
- command.cooker.updateConfigOpts(options, environment)
+ cmdline = params[2]
+ command.cooker.updateConfigOpts(options, environment, cmdline)
updateConfig.needconfig = False
def parseConfiguration(self, command, params):
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 7521ae8..3c9e88c 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -192,6 +192,8 @@ class BBCooker:
bb.parse.__mtime_cache = {}
bb.parse.BBHandler.cached_statements = {}
+ self.ui_cmdline = None
+
self.initConfigurationData()
# we log all events to a file if so directed
@@ -366,6 +368,8 @@ class BBCooker:
if consolelog:
self.data.setVar("BB_CONSOLELOG", consolelog)
+ self.data.setVar('BB_CMDLINE', self.ui_cmdline)
+
#
# Copy of the data store which has been expanded.
# Used for firing events and accessing variables where expansion needs to be accounted for
@@ -543,7 +547,8 @@ class BBCooker:
self.handleCollections(self.data.getVar("BBFILE_COLLECTIONS"))
- def updateConfigOpts(self, options, environment):
+ def updateConfigOpts(self, options, environment, cmdline):
+ self.ui_cmdline = cmdline
clean = True
for o in options:
if o in ['prefile', 'postfile']:
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 722d860..e408a35 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -79,7 +79,7 @@ class ConfigParameters(object):
"prefile", "postfile"]:
options[o] = getattr(self.options, o)
- ret, error = server.runCommand(["updateConfig", options, environment])
+ ret, error = server.runCommand(["updateConfig", options, environment, sys.argv])
if error:
raise Exception("Unable to update the server configuration with local parameters: %s" % error)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list