summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-21 16:07:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-23 11:33:54 +0000
commit4eb3ffe5714b9beacc6a5f5373549aa640095983 (patch)
tree860d870a4dcd3952c3965331f9287bf338cd62e3 /bitbake/lib/bb
parent793f2f2e69cf3e4ef57a13f07538226b082cf868 (diff)
downloadpoky-4eb3ffe5714b9beacc6a5f5373549aa640095983.tar.gz
bitbake: cooker: Rename event_data -> expanded_data
event_data would be better named expanded_data, then we can widen its scope to other places in cooker where we need to access an expanded data store. We certainly don't want multiple expanded data stores. (Bitbake rev: 1a3c1c9203e1a1452314954f1cfd771e5c1ce89b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/command.py6
-rw-r--r--bitbake/lib/bb/cooker.py23
2 files changed, 15 insertions, 14 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 29b0a53e98..24ff341045 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -123,11 +123,11 @@ class Command:
123 123
124 def finishAsyncCommand(self, msg=None, code=None): 124 def finishAsyncCommand(self, msg=None, code=None):
125 if msg or msg == "": 125 if msg or msg == "":
126 bb.event.fire(CommandFailed(msg), self.cooker.event_data) 126 bb.event.fire(CommandFailed(msg), self.cooker.expanded_data)
127 elif code: 127 elif code:
128 bb.event.fire(CommandExit(code), self.cooker.event_data) 128 bb.event.fire(CommandExit(code), self.cooker.expanded_data)
129 else: 129 else:
130 bb.event.fire(CommandCompleted(), self.cooker.event_data) 130 bb.event.fire(CommandCompleted(), self.cooker.expanded_data)
131 self.currentAsyncCommand = None 131 self.currentAsyncCommand = None
132 self.cooker.finishcommand() 132 self.cooker.finishcommand()
133 133
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index d9b200e129..a7560a17d0 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -324,11 +324,12 @@ class BBCooker:
324 324
325 325
326 # 326 #
327 # Special updated configuration we use for firing events 327 # Copy of the data store which has been expanded.
328 # Used for firing events and accessing variables where expansion needs to be accounted for
328 # 329 #
329 self.event_data = bb.data.createCopy(self.data) 330 self.expanded_data = bb.data.createCopy(self.data)
330 bb.data.update_data(self.event_data) 331 bb.data.update_data(self.expanded_data)
331 bb.parse.init_parser(self.event_data) 332 bb.parse.init_parser(self.expanded_data)
332 333
333 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset: 334 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
334 self.disableDataTracking() 335 self.disableDataTracking()
@@ -1182,7 +1183,7 @@ class BBCooker:
1182 bf = os.path.abspath(bf) 1183 bf = os.path.abspath(bf)
1183 1184
1184 self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities) 1185 self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities)
1185 filelist, masked = self.collection.collect_bbfiles(self.data, self.event_data) 1186 filelist, masked = self.collection.collect_bbfiles(self.data, self.expanded_data)
1186 try: 1187 try:
1187 os.stat(bf) 1188 os.stat(bf)
1188 bf = os.path.abspath(bf) 1189 bf = os.path.abspath(bf)
@@ -1272,7 +1273,7 @@ class BBCooker:
1272 taskdata.add_provider(self.data, self.recipecache, item) 1273 taskdata.add_provider(self.data, self.recipecache, item)
1273 1274
1274 buildname = self.data.getVar("BUILDNAME") 1275 buildname = self.data.getVar("BUILDNAME")
1275 bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.event_data) 1276 bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data)
1276 1277
1277 # Execute the runqueue 1278 # Execute the runqueue
1278 runlist = [[item, "do_%s" % task]] 1279 runlist = [[item, "do_%s" % task]]
@@ -1299,7 +1300,7 @@ class BBCooker:
1299 return False 1300 return False
1300 1301
1301 if not retval: 1302 if not retval:
1302 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.event_data) 1303 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runq_fnid), buildname, item, failures), self.expanded_data)
1303 self.command.finishAsyncCommand(msg) 1304 self.command.finishAsyncCommand(msg)
1304 return False 1305 return False
1305 if retval is True: 1306 if retval is True:
@@ -1446,14 +1447,14 @@ class BBCooker:
1446 if CookerFeatures.SEND_SANITYEVENTS in self.featureset: 1447 if CookerFeatures.SEND_SANITYEVENTS in self.featureset:
1447 bb.event.fire(bb.event.SanityCheck(False), self.data) 1448 bb.event.fire(bb.event.SanityCheck(False), self.data)
1448 1449
1449 ignore = self.data.getVar("ASSUME_PROVIDED", True) or "" 1450 ignore = self.expanded_data.getVar("ASSUME_PROVIDED", True) or ""
1450 self.recipecache.ignored_dependencies = set(ignore.split()) 1451 self.recipecache.ignored_dependencies = set(ignore.split())
1451 1452
1452 for dep in self.configuration.extra_assume_provided: 1453 for dep in self.configuration.extra_assume_provided:
1453 self.recipecache.ignored_dependencies.add(dep) 1454 self.recipecache.ignored_dependencies.add(dep)
1454 1455
1455 self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities) 1456 self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities)
1456 (filelist, masked) = self.collection.collect_bbfiles(self.data, self.event_data) 1457 (filelist, masked) = self.collection.collect_bbfiles(self.data, self.expanded_data)
1457 1458
1458 self.data.renameVar("__depends", "__base_depends") 1459 self.data.renameVar("__depends", "__base_depends")
1459 self.add_filewatch(self.data.getVar("__base_depends"), self.configwatcher) 1460 self.add_filewatch(self.data.getVar("__base_depends"), self.configwatcher)
@@ -1513,13 +1514,13 @@ class BBCooker:
1513 try: 1514 try:
1514 self.prhost = prserv.serv.auto_start(self.data) 1515 self.prhost = prserv.serv.auto_start(self.data)
1515 except prserv.serv.PRServiceConfigError: 1516 except prserv.serv.PRServiceConfigError:
1516 bb.event.fire(CookerExit(), self.event_data) 1517 bb.event.fire(CookerExit(), self.expanded_data)
1517 self.state = state.error 1518 self.state = state.error
1518 return 1519 return
1519 1520
1520 def post_serve(self): 1521 def post_serve(self):
1521 prserv.serv.auto_shutdown(self.data) 1522 prserv.serv.auto_shutdown(self.data)
1522 bb.event.fire(CookerExit(), self.event_data) 1523 bb.event.fire(CookerExit(), self.expanded_data)
1523 1524
1524 def shutdown(self, force = False): 1525 def shutdown(self, force = False):
1525 if force: 1526 if force: