diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-23 12:58:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-23 20:06:06 +0100 |
commit | ff5fba8462151364a3834453ee5c861f471cf8d3 (patch) | |
tree | 93b87a7e998c36e368802e77b8f070f7d85758eb /bitbake | |
parent | b98bd94e2afa33ecc9861eea046fa7bd386b07c3 (diff) | |
download | ast2050-yocto-poky-ff5fba8462151364a3834453ee5c861f471cf8d3.zip ast2050-yocto-poky-ff5fba8462151364a3834453ee5c861f471cf8d3.tar.gz |
bitbake: knotty: Ensure commandline parameters are updated in memres server
When using options like -k, -f, -v and so on with the memory resident
server, they'd currently only be set on the initial values passed to
the original command. This ensures they now match those specified
on the commandline for the options where this makes sense.
To make this work, a command to update the options on the server side
is required so this is added.
[YOCTO #5292]
(Bitbake rev: 1c75cc4d0c8b606c1fe76e6bf60bf6a32298b105)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/command.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 11 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 1 |
4 files changed, 20 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 0cfed0a..60f9ac0 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -271,6 +271,10 @@ class CommandsSync: # we always take and leave the cooker in state.initial setFeatures.readonly = True + def updateConfig(self, command, params): + options = params[0] + command.cooker.updateConfigOpts(options) + class CommandsAsync: """ A class of asynchronous commands diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index f463603..c6c69c3 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -371,6 +371,10 @@ class BBCooker: self.handleCollections( self.data.getVar("BBFILE_COLLECTIONS", True) ) + def updateConfigOpts(self,options): + for o in options: + setattr(self.configuration, o, options[o]) + def runCommands(self, server, data, abort): """ Run any queued asynchronous command diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 60a6d51..470d538 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -69,6 +69,17 @@ class ConfigParameters(object): if bbpkgs: self.options.pkgs_to_build.extend(bbpkgs.split()) + def updateToServer(self, server): + options = {} + for o in ["abort", "tryaltconfigs", "force", "invalidate_stamp", + "verbose", "debug", "dry_run", "dump_signatures", + "debug_domains", "extra_assume_provided", "profile"]: + options[o] = getattr(self.options, o) + + ret, error = server.runCommand(["updateConfig", options]) + if error: + raise Exception("Unable to update the server configuration with local parameters: %s" % error) + def parseActions(self): # Parse any commandline into actions action = {'action':None, 'msg':None} diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 307886d..9e58b31 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -284,6 +284,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): if not params.observe_only: params.updateFromServer(server) + params.updateToServer(server) cmdline = params.parseActions() if not cmdline: print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") |