summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-27 14:59:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-28 14:03:02 +0000
commit2fc06a12a1fd3988dfb37110a147ea0fbb036174 (patch)
tree68b12d7736d8250a59fd1a31f959fa063b63adf8 /bitbake
parentb585c4b8b86214f97180d3e7b544afd9327298a4 (diff)
downloadpoky-2fc06a12a1fd3988dfb37110a147ea0fbb036174.tar.gz
bitbake: cooker: Allow featureset in error state
Currently, if an invalid PR service is selected the server will error with a traceback. This is because its set into the error state and the setFeature code will then fail since its not in the initial state. Modifying the featureset in the error state is acceptable, we just need to ensure we don't trigger a reset, that would happen from whichever code handles the error. [YOCTO #6934] (Bitbake rev: c52841445d8db8f84c4da34203b195fea5874247) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index a08c14bbdc..df9a0cab03 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -165,13 +165,13 @@ class BBCooker:
165 165
166 def setFeatures(self, features): 166 def setFeatures(self, features):
167 # we only accept a new feature set if we're in state initial, so we can reset without problems 167 # we only accept a new feature set if we're in state initial, so we can reset without problems
168 if self.state != state.initial: 168 if self.state != state.initial and self.state != state.error:
169 raise Exception("Illegal state for feature set change") 169 raise Exception("Illegal state for feature set change")
170 original_featureset = list(self.featureset) 170 original_featureset = list(self.featureset)
171 for feature in features: 171 for feature in features:
172 self.featureset.setFeature(feature) 172 self.featureset.setFeature(feature)
173 bb.debug(1, "Features set %s (was %s)" % (original_featureset, list(self.featureset))) 173 bb.debug(1, "Features set %s (was %s)" % (original_featureset, list(self.featureset)))
174 if (original_featureset != list(self.featureset)): 174 if (original_featureset != list(self.featureset)) and self.state != state.error:
175 self.reset() 175 self.reset()
176 176
177 def initConfigurationData(self): 177 def initConfigurationData(self):