diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/command.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 21 | ||||
-rw-r--r-- | bitbake/lib/bb/tinfoil.py | 5 |
4 files changed, 16 insertions, 16 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 916eedac19..cc6a981921 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -387,7 +387,9 @@ class CommandsAsync: | |||
387 | """ | 387 | """ |
388 | prefiles = params[0] | 388 | prefiles = params[0] |
389 | postfiles = params[1] | 389 | postfiles = params[1] |
390 | command.cooker.databuilder.parseConfigurationFiles(prefiles, postfiles) | 390 | command.cooker.configuration.prefile = prefiles |
391 | command.cooker.configuration.postfile = postfiles | ||
392 | command.cooker.loadConfigurationData() | ||
391 | command.finishAsyncCommand() | 393 | command.finishAsyncCommand() |
392 | parseConfigurationFiles.needcache = False | 394 | parseConfigurationFiles.needcache = False |
393 | 395 | ||
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 4c0b569439..cd9cccdfce 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -165,7 +165,7 @@ class BBCooker: | |||
165 | if not self.configuration.server_register_idlecallback: | 165 | if not self.configuration.server_register_idlecallback: |
166 | worker = True | 166 | worker = True |
167 | 167 | ||
168 | self.databuilder = bb.cookerdata.CookerDataBuilder(self.configuration.params, worker) | 168 | self.databuilder = bb.cookerdata.CookerDataBuilder(self.configuration, worker) |
169 | self.configuration.data = self.databuilder.data | 169 | self.configuration.data = self.databuilder.data |
170 | 170 | ||
171 | def enableDataTracking(self): | 171 | def enableDataTracking(self): |
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 2247f8d3bd..11063b4af2 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
@@ -38,7 +38,7 @@ class ConfigParameters(object): | |||
38 | self.options.pkgs_to_build = targets or [] | 38 | self.options.pkgs_to_build = targets or [] |
39 | 39 | ||
40 | self.options.tracking = False | 40 | self.options.tracking = False |
41 | if self.options.show_environment: | 41 | if hasattr(self.options, "show_environment") and self.options.show_environment: |
42 | self.options.tracking = True | 42 | self.options.tracking = True |
43 | 43 | ||
44 | for key, val in self.options.__dict__.items(): | 44 | for key, val in self.options.__dict__.items(): |
@@ -125,12 +125,16 @@ class CookerConfiguration(object): | |||
125 | self.invalidate_stamp = False | 125 | self.invalidate_stamp = False |
126 | self.dump_signatures = False | 126 | self.dump_signatures = False |
127 | self.dry_run = False | 127 | self.dry_run = False |
128 | self.tracking = False | ||
129 | |||
130 | self.env = {} | ||
128 | 131 | ||
129 | def setConfigParameters(self, parameters): | 132 | def setConfigParameters(self, parameters): |
130 | self.params = parameters | ||
131 | for key in self.__dict__.keys(): | 133 | for key in self.__dict__.keys(): |
132 | if key in parameters.options.__dict__: | 134 | if key in parameters.options.__dict__: |
133 | setattr(self, key, parameters.options.__dict__[key]) | 135 | setattr(self, key, parameters.options.__dict__[key]) |
136 | self.env = parameters.environment.copy() | ||
137 | self.tracking = parameters.tracking | ||
134 | 138 | ||
135 | def setServerRegIdleCallback(self, srcb): | 139 | def setServerRegIdleCallback(self, srcb): |
136 | self.server_register_idlecallback = srcb | 140 | self.server_register_idlecallback = srcb |
@@ -167,11 +171,11 @@ def findConfigFile(configfile): | |||
167 | 171 | ||
168 | class CookerDataBuilder(object): | 172 | class CookerDataBuilder(object): |
169 | 173 | ||
170 | def __init__(self, params, worker = False): | 174 | def __init__(self, cookercfg, worker = False): |
171 | 175 | ||
172 | self.prefiles = params.prefile | 176 | self.prefiles = cookercfg.prefile |
173 | self.postfiles = params.postfile | 177 | self.postfiles = cookercfg.postfile |
174 | self.tracking = params.tracking | 178 | self.tracking = cookercfg.tracking |
175 | 179 | ||
176 | bb.utils.set_context(bb.utils.clean_context()) | 180 | bb.utils.set_context(bb.utils.clean_context()) |
177 | bb.event.set_class_handlers(bb.event.clean_class_handlers()) | 181 | bb.event.set_class_handlers(bb.event.clean_class_handlers()) |
@@ -184,9 +188,8 @@ class CookerDataBuilder(object): | |||
184 | # to use environment variables which have been cleaned from the | 188 | # to use environment variables which have been cleaned from the |
185 | # BitBake processes env | 189 | # BitBake processes env |
186 | self.savedenv = bb.data.init() | 190 | self.savedenv = bb.data.init() |
187 | savedenv = params.environment | 191 | for k in cookercfg.env: |
188 | for k in savedenv: | 192 | self.savedenv.setVar(k, cookercfg.env[k]) |
189 | self.savedenv.setVar(k, savedenv[k]) | ||
190 | 193 | ||
191 | filtered_keys = bb.utils.approved_variables() | 194 | filtered_keys = bb.utils.approved_variables() |
192 | bb.data.inheritFromOS(self.data, self.savedenv, filtered_keys) | 195 | bb.data.inheritFromOS(self.data, self.savedenv, filtered_keys) |
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index c05e1465f1..45bac5edcb 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -90,11 +90,6 @@ class TinfoilConfigParameters(ConfigParameters): | |||
90 | def parseCommandLine(self): | 90 | def parseCommandLine(self): |
91 | class DummyOptions: | 91 | class DummyOptions: |
92 | def __init__(self, initial_options): | 92 | def __init__(self, initial_options): |
93 | self.show_environment = False | ||
94 | self.pkgs_to_build = [] | ||
95 | self.prefile = [] | ||
96 | self.postfile = [] | ||
97 | self.tracking = False | ||
98 | for key, val in initial_options.items(): | 93 | for key, val in initial_options.items(): |
99 | setattr(self, key, val) | 94 | setattr(self, key, val) |
100 | 95 | ||