summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-13 17:31:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-14 08:20:38 +0100
commit7663a520612203db35145609a8ff3fd80de4149a (patch)
tree7b26dd111b828926eaccb36144548e900069e080 /bitbake/lib/bb/cooker.py
parent2174a51ee8bcfd3a14e0a889e9beccc0b32e406b (diff)
downloadpoky-7663a520612203db35145609a8ff3fd80de4149a.tar.gz
bitbake: cooker: Rename confusing 'stop' state to 'forceshutdown'
The shutdown state causes the server to finish what its doing, stop was them meant to completely stop it. It doesn't mean the server is stopped though. Renaming the current stop event for forceshutdown gives more meaning to what it actually does. The stopped namespace then becomes available to indicate a completely stopped server. (Bitbake rev: 12e9d33bfae5294e3870dfd1202f63383ad05e92) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 7034f1d718..4b2e5bf917 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -61,7 +61,7 @@ class CollectionError(bb.BBHandledException):
61 """ 61 """
62 62
63class state: 63class state:
64 initial, parsing, running, shutdown, stop = range(5) 64 initial, parsing, running, shutdown, forceshutdown, stopped = range(6)
65 65
66 66
67class SkippedPackage: 67class SkippedPackage:
@@ -1044,7 +1044,7 @@ class BBCooker:
1044 1044
1045 def buildFileIdle(server, rq, abort): 1045 def buildFileIdle(server, rq, abort):
1046 1046
1047 if abort or self.state == state.stop: 1047 if abort or self.state == state.forceshutdown:
1048 rq.finish_runqueue(True) 1048 rq.finish_runqueue(True)
1049 elif self.state == state.shutdown: 1049 elif self.state == state.shutdown:
1050 rq.finish_runqueue(False) 1050 rq.finish_runqueue(False)
@@ -1081,7 +1081,7 @@ class BBCooker:
1081 targets = self.checkPackages(targets) 1081 targets = self.checkPackages(targets)
1082 1082
1083 def buildTargetsIdle(server, rq, abort): 1083 def buildTargetsIdle(server, rq, abort):
1084 if abort or self.state == state.stop: 1084 if abort or self.state == state.forceshutdown:
1085 rq.finish_runqueue(True) 1085 rq.finish_runqueue(True)
1086 elif self.state == state.shutdown: 1086 elif self.state == state.shutdown:
1087 rq.finish_runqueue(False) 1087 rq.finish_runqueue(False)
@@ -1170,7 +1170,7 @@ class BBCooker:
1170 if self.state == state.running: 1170 if self.state == state.running:
1171 return 1171 return
1172 1172
1173 if self.state in (state.shutdown, state.stop): 1173 if self.state in (state.shutdown, state.forceshutdown):
1174 self.parser.shutdown(clean=False, force = True) 1174 self.parser.shutdown(clean=False, force = True)
1175 sys.exit(1) 1175 sys.exit(1)
1176 1176
@@ -1240,11 +1240,11 @@ class BBCooker:
1240 prserv.serv.auto_shutdown(self.data) 1240 prserv.serv.auto_shutdown(self.data)
1241 bb.event.fire(CookerExit(), self.event_data) 1241 bb.event.fire(CookerExit(), self.event_data)
1242 1242
1243 def shutdown(self): 1243 def shutdown(self, force = False):
1244 self.state = state.shutdown 1244 if force:
1245 1245 self.state = state.forceshutdown
1246 def stop(self): 1246 else:
1247 self.state = state.stop 1247 self.state = state.shutdown
1248 1248
1249 def initialize(self): 1249 def initialize(self):
1250 self.initConfigurationData() 1250 self.initConfigurationData()