summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-04-01 12:24:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-01 12:53:26 +0100
commitf688f6b566f455eb55d6e5491c80b88c493e158b (patch)
tree55df1bc911e0e52804d2ac6e4d561da4c601a287 /bitbake/lib/bb/cooker.py
parentd5a0a6b67632c99ea08e2782e8b7e345962470df (diff)
downloadpoky-f688f6b566f455eb55d6e5491c80b88c493e158b.tar.gz
bitbake: bitbake: cooker: mark setFeatures command as read-only
This patch makes sure that the setFeatures command is marked as read-only and that it can only run if the cooker is in the initial state. Additionally, remove logging from the XMLRPC module in favor of sending the exception to the client for easy processing. [YOCTO #6089] (Bitbake rev: f0a1a3e24757f7658d272035620465f92a3e4c3c) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index e6916a621b..f41f5946ae 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -159,6 +159,9 @@ class BBCooker:
159 self.state = state.forceshutdown 159 self.state = state.forceshutdown
160 160
161 def setFeatures(self, features): 161 def setFeatures(self, features):
162 # we only accept a new feature set if we're in state initial, so we can reset without problems
163 if self.state != state.initial:
164 raise Exception("Illegal state for feature set change")
162 original_featureset = list(self.featureset) 165 original_featureset = list(self.featureset)
163 for feature in features: 166 for feature in features:
164 self.featureset.setFeature(feature) 167 self.featureset.setFeature(feature)