cooker/command: Add setFeatures command
PATCH 1/1 cooker/command: Add setFeatures command
Add a command to allow backends to set particular 'features' on the cooker (server).
Signed-off-by Richard Purdie <[email protected]>
---
bitbake/lib/bb/command.py +7 -0
@@ -257,6 +257,13 @@ class CommandsSync: mask = params[3] return bb.event.set_UIHmask(handlerNum, llevel, debug_domains, mask) + def setFeatures(self, command, params): + """ + Set the cooker features to include the passed list of features + """ + features = params[0] + command.cooker.setFeatures(features) + class CommandsAsync: """ A class of asynchronous commands
bitbake/lib/bb/cooker.py +8 -0
@@ -149,6 +149,14 @@ class BBCooker: self.parser = None + def setFeatures(self, features): + original_featureset = list(self.featureset) + for feature in features: + self.featureset.setFeature(feature) + bb.debug(1, "Features set %s (was %s)" % (original_featureset, list(self.featureset))) + if (original_featureset != list(self.featureset)): + self.reset() + def initConfigurationData(self): self.state = state.initial