summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/command.py7
-rw-r--r--bitbake/lib/bb/cooker.py8
2 files changed, 15 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index e30d21d379..3788207122 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -257,6 +257,13 @@ class CommandsSync:
257 mask = params[3] 257 mask = params[3]
258 return bb.event.set_UIHmask(handlerNum, llevel, debug_domains, mask) 258 return bb.event.set_UIHmask(handlerNum, llevel, debug_domains, mask)
259 259
260 def setFeatures(self, command, params):
261 """
262 Set the cooker features to include the passed list of features
263 """
264 features = params[0]
265 command.cooker.setFeatures(features)
266
260class CommandsAsync: 267class CommandsAsync:
261 """ 268 """
262 A class of asynchronous commands 269 A class of asynchronous commands
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 96f05b5309..8d63195189 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -149,6 +149,14 @@ class BBCooker:
149 149
150 self.parser = None 150 self.parser = None
151 151
152 def setFeatures(self, features):
153 original_featureset = list(self.featureset)
154 for feature in features:
155 self.featureset.setFeature(feature)
156 bb.debug(1, "Features set %s (was %s)" % (original_featureset, list(self.featureset)))
157 if (original_featureset != list(self.featureset)):
158 self.reset()
159
152 def initConfigurationData(self): 160 def initConfigurationData(self):
153 161
154 self.state = state.initial 162 self.state = state.initial