]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: preserve pre and post configs
authorEd Bartosh <ed.bartosh@linux.intel.com>
Fri, 16 Oct 2015 16:23:58 +0000 (19:23 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 27 Oct 2015 07:23:21 +0000 (07:23 +0000)
Additional config files passed to bitbake server with --read and
--postread options are rewritten by client bitbake even if
it doesn't use those options.

This is a show stopper for toaster as toaster command line
builds are based on the assumption that server is aware of
toster configs, provided by --postread option.

This behaviour is fixed by preserving values of --read and
--postread options when bitbake server starts and restoring
them if client bitbake doesn't explicitly specify them.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py
lib/bb/cookerdata.py
lib/bb/main.py

index a416d2efe12e6b7eb8bbd8ffd1fa40349253e011..276e42eec2966fbcfa29ad406b1a2991cd48b3b5 100644 (file)
@@ -531,6 +531,11 @@ class BBCooker:
         for o in options:
             if o in ['prefile', 'postfile']:
                 clean = False
+                server_val = getattr(self.configuration, "%s_server" % o)
+                if not options[o] and server_val:
+                    # restore value provided on server start
+                    setattr(self.configuration, o, server_val)
+                    continue
             setattr(self.configuration, o, options[o])
         for k in bb.utils.approved_variables():
             if k in environment and k not in self.configuration.env:
index a3fa55256d74f6b8befafb294b18593f738f6508..671c0cb0e2df2505c416be960ca3f654552049dd 100644 (file)
@@ -129,6 +129,8 @@ class CookerConfiguration(object):
         self.extra_assume_provided = []
         self.prefile = []
         self.postfile = []
+        self.prefile_server = []
+        self.postfile_server = []
         self.debug = 0
         self.cmd = None
         self.abort = True
index 8762f7220acd564b78d24cd842ef3bbefb0bdf02..c8530fc3d865ad3e1f9b69bb0af424b42b8e9b63 100755 (executable)
@@ -383,6 +383,13 @@ def bitbake_main(configParams, configuration):
         # Collect the feature set for the UI
         featureset = getattr(ui_module, "featureSet", [])
 
+    if configParams.server_only:
+        for param in ('prefile', 'postfile'):
+            value = getattr(configParams, param)
+            if value:
+                setattr(configuration, "%s_server" % param, value)
+                param = "%s_server" % param
+
     if not configParams.remote_server:
         # we start a server with a given configuration
         server = start_server(servermodule, configParams, configuration, featureset)