summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/command.py6
-rw-r--r--bitbake/lib/bb/cooker.py26
-rw-r--r--bitbake/lib/bb/runqueue.py8
3 files changed, 19 insertions, 21 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 5bce796b7c..db20f3ffad 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -133,11 +133,11 @@ class Command:
133 133
134 def finishAsyncCommand(self, msg=None, code=None): 134 def finishAsyncCommand(self, msg=None, code=None):
135 if msg or msg == "": 135 if msg or msg == "":
136 bb.event.fire(CommandFailed(msg), self.cooker.expanded_data) 136 bb.event.fire(CommandFailed(msg), self.cooker.data)
137 elif code: 137 elif code:
138 bb.event.fire(CommandExit(code), self.cooker.expanded_data) 138 bb.event.fire(CommandExit(code), self.cooker.data)
139 else: 139 else:
140 bb.event.fire(CommandCompleted(), self.cooker.expanded_data) 140 bb.event.fire(CommandCompleted(), self.cooker.data)
141 self.currentAsyncCommand = None 141 self.currentAsyncCommand = None
142 self.cooker.finishcommand() 142 self.cooker.finishcommand()
143 143
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 620ff9f3d3..30131fb478 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -367,9 +367,7 @@ class BBCooker:
367 # Copy of the data store which has been expanded. 367 # Copy of the data store which has been expanded.
368 # Used for firing events and accessing variables where expansion needs to be accounted for 368 # Used for firing events and accessing variables where expansion needs to be accounted for
369 # 369 #
370 self.expanded_data = bb.data.createCopy(self.data) 370 bb.parse.init_parser(self.data)
371 bb.data.update_data(self.expanded_data)
372 bb.parse.init_parser(self.expanded_data)
373 371
374 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset: 372 if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
375 self.disableDataTracking() 373 self.disableDataTracking()
@@ -619,7 +617,7 @@ class BBCooker:
619 fn = self.matchFile(fn) 617 fn = self.matchFile(fn)
620 fn = bb.cache.realfn2virtual(fn, cls, mc) 618 fn = bb.cache.realfn2virtual(fn, cls, mc)
621 elif len(pkgs_to_build) == 1: 619 elif len(pkgs_to_build) == 1:
622 ignore = self.expanded_data.getVar("ASSUME_PROVIDED") or "" 620 ignore = self.data.getVar("ASSUME_PROVIDED") or ""
623 if pkgs_to_build[0] in set(ignore.split()): 621 if pkgs_to_build[0] in set(ignore.split()):
624 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0]) 622 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0])
625 623
@@ -1090,7 +1088,7 @@ class BBCooker:
1090 def findBestProvider(self, pn, mc=''): 1088 def findBestProvider(self, pn, mc=''):
1091 if pn in self.recipecaches[mc].providers: 1089 if pn in self.recipecaches[mc].providers:
1092 filenames = self.recipecaches[mc].providers[pn] 1090 filenames = self.recipecaches[mc].providers[pn]
1093 eligible, foundUnique = bb.providers.filterProviders(filenames, pn, self.expanded_data, self.recipecaches[mc]) 1091 eligible, foundUnique = bb.providers.filterProviders(filenames, pn, self.data, self.recipecaches[mc])
1094 filename = eligible[0] 1092 filename = eligible[0]
1095 return None, None, None, filename 1093 return None, None, None, filename
1096 elif pn in self.recipecaches[mc].pkg_pn: 1094 elif pn in self.recipecaches[mc].pkg_pn:
@@ -1304,7 +1302,7 @@ class BBCooker:
1304 bf = os.path.abspath(bf) 1302 bf = os.path.abspath(bf)
1305 1303
1306 self.collection = CookerCollectFiles(self.bbfile_config_priorities) 1304 self.collection = CookerCollectFiles(self.bbfile_config_priorities)
1307 filelist, masked = self.collection.collect_bbfiles(self.data, self.expanded_data) 1305 filelist, masked = self.collection.collect_bbfiles(self.data, self.data)
1308 try: 1306 try:
1309 os.stat(bf) 1307 os.stat(bf)
1310 bf = os.path.abspath(bf) 1308 bf = os.path.abspath(bf)
@@ -1339,7 +1337,7 @@ class BBCooker:
1339 """ 1337 """
1340 Build the file matching regexp buildfile 1338 Build the file matching regexp buildfile
1341 """ 1339 """
1342 bb.event.fire(bb.event.BuildInit(), self.expanded_data) 1340 bb.event.fire(bb.event.BuildInit(), self.data)
1343 1341
1344 if not hidewarning: 1342 if not hidewarning:
1345 # Too many people use -b because they think it's how you normally 1343 # Too many people use -b because they think it's how you normally
@@ -1399,7 +1397,7 @@ class BBCooker:
1399 taskdata[mc].add_provider(self.data, self.recipecaches[mc], item) 1397 taskdata[mc].add_provider(self.data, self.recipecaches[mc], item)
1400 1398
1401 buildname = self.data.getVar("BUILDNAME") 1399 buildname = self.data.getVar("BUILDNAME")
1402 bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data) 1400 bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.data)
1403 1401
1404 # Execute the runqueue 1402 # Execute the runqueue
1405 runlist = [[mc, item, task, fn]] 1403 runlist = [[mc, item, task, fn]]
@@ -1429,7 +1427,7 @@ class BBCooker:
1429 return False 1427 return False
1430 1428
1431 if not retval: 1429 if not retval:
1432 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, item, failures, interrupted), self.expanded_data) 1430 bb.event.fire(bb.event.BuildCompleted(len(rq.rqdata.runtaskentries), buildname, item, failures, interrupted), self.data)
1433 self.command.finishAsyncCommand(msg) 1431 self.command.finishAsyncCommand(msg)
1434 return False 1432 return False
1435 if retval is True: 1433 if retval is True:
@@ -1484,7 +1482,7 @@ class BBCooker:
1484 1482
1485 packages = [target if ':' in target else '%s:%s' % (target, task) for target in targets] 1483 packages = [target if ':' in target else '%s:%s' % (target, task) for target in targets]
1486 1484
1487 bb.event.fire(bb.event.BuildInit(packages), self.expanded_data) 1485 bb.event.fire(bb.event.BuildInit(packages), self.data)
1488 1486
1489 taskdata, runlist = self.buildTaskData(targets, task, self.configuration.abort) 1487 taskdata, runlist = self.buildTaskData(targets, task, self.configuration.abort)
1490 1488
@@ -1622,7 +1620,7 @@ class BBCooker:
1622 self.recipecaches[mc].ignored_dependencies.add(dep) 1620 self.recipecaches[mc].ignored_dependencies.add(dep)
1623 1621
1624 self.collection = CookerCollectFiles(self.bbfile_config_priorities) 1622 self.collection = CookerCollectFiles(self.bbfile_config_priorities)
1625 (filelist, masked) = self.collection.collect_bbfiles(self.data, self.expanded_data) 1623 (filelist, masked) = self.collection.collect_bbfiles(self.data, self.data)
1626 1624
1627 self.parser = CookerParser(self, filelist, masked) 1625 self.parser = CookerParser(self, filelist, masked)
1628 self.parsecache_valid = True 1626 self.parsecache_valid = True
@@ -1656,7 +1654,7 @@ class BBCooker:
1656 if len(pkgs_to_build) == 0: 1654 if len(pkgs_to_build) == 0:
1657 raise NothingToBuild 1655 raise NothingToBuild
1658 1656
1659 ignore = (self.expanded_data.getVar("ASSUME_PROVIDED") or "").split() 1657 ignore = (self.data.getVar("ASSUME_PROVIDED") or "").split()
1660 for pkg in pkgs_to_build: 1658 for pkg in pkgs_to_build:
1661 if pkg in ignore: 1659 if pkg in ignore:
1662 parselog.warning("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg) 1660 parselog.warning("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg)
@@ -1689,13 +1687,13 @@ class BBCooker:
1689 try: 1687 try:
1690 self.prhost = prserv.serv.auto_start(self.data) 1688 self.prhost = prserv.serv.auto_start(self.data)
1691 except prserv.serv.PRServiceConfigError: 1689 except prserv.serv.PRServiceConfigError:
1692 bb.event.fire(CookerExit(), self.expanded_data) 1690 bb.event.fire(CookerExit(), self.data)
1693 self.state = state.error 1691 self.state = state.error
1694 return 1692 return
1695 1693
1696 def post_serve(self): 1694 def post_serve(self):
1697 prserv.serv.auto_shutdown(self.data) 1695 prserv.serv.auto_shutdown(self.data)
1698 bb.event.fire(CookerExit(), self.expanded_data) 1696 bb.event.fire(CookerExit(), self.data)
1699 lockfile = self.lock.name 1697 lockfile = self.lock.name
1700 self.lock.close() 1698 self.lock.close()
1701 self.lock = None 1699 self.lock = None
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 2ad8aad98e..da7502118a 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1341,7 +1341,7 @@ class RunQueue:
1341 sq_hash.append(self.rqdata.runtaskentries[tid].hash) 1341 sq_hash.append(self.rqdata.runtaskentries[tid].hash)
1342 sq_taskname.append(taskname) 1342 sq_taskname.append(taskname)
1343 sq_task.append(tid) 1343 sq_task.append(tid)
1344 locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.expanded_data } 1344 locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.data }
1345 try: 1345 try:
1346 call = self.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=True)" 1346 call = self.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=True)"
1347 valid = bb.utils.better_eval(call, locs) 1347 valid = bb.utils.better_eval(call, locs)
@@ -1525,7 +1525,7 @@ class RunQueueExecute:
1525 pn = self.rqdata.dataCaches[mc].pkg_fn[fn] 1525 pn = self.rqdata.dataCaches[mc].pkg_fn[fn]
1526 taskdata[dep] = [pn, taskname, fn] 1526 taskdata[dep] = [pn, taskname, fn]
1527 call = self.rq.depvalidate + "(task, taskdata, notneeded, d)" 1527 call = self.rq.depvalidate + "(task, taskdata, notneeded, d)"
1528 locs = { "task" : task, "taskdata" : taskdata, "notneeded" : self.scenequeue_notneeded, "d" : self.cooker.expanded_data } 1528 locs = { "task" : task, "taskdata" : taskdata, "notneeded" : self.scenequeue_notneeded, "d" : self.cooker.data }
1529 valid = bb.utils.better_eval(call, locs) 1529 valid = bb.utils.better_eval(call, locs)
1530 return valid 1530 return valid
1531 1531
@@ -1593,7 +1593,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
1593 invalidtasks.append(tid) 1593 invalidtasks.append(tid)
1594 1594
1595 call = self.rq.setsceneverify + "(covered, tasknames, fns, d, invalidtasks=invalidtasks)" 1595 call = self.rq.setsceneverify + "(covered, tasknames, fns, d, invalidtasks=invalidtasks)"
1596 locs = { "covered" : self.rq.scenequeue_covered, "tasknames" : tasknames, "fns" : fns, "d" : self.cooker.expanded_data, "invalidtasks" : invalidtasks } 1596 locs = { "covered" : self.rq.scenequeue_covered, "tasknames" : tasknames, "fns" : fns, "d" : self.cooker.data, "invalidtasks" : invalidtasks }
1597 covered_remove = bb.utils.better_eval(call, locs) 1597 covered_remove = bb.utils.better_eval(call, locs)
1598 1598
1599 def removecoveredtask(tid): 1599 def removecoveredtask(tid):
@@ -2086,7 +2086,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
2086 sq_taskname.append(taskname) 2086 sq_taskname.append(taskname)
2087 sq_task.append(tid) 2087 sq_task.append(tid)
2088 call = self.rq.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, d)" 2088 call = self.rq.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, d)"
2089 locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.expanded_data } 2089 locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.data }
2090 valid = bb.utils.better_eval(call, locs) 2090 valid = bb.utils.better_eval(call, locs)
2091 2091
2092 valid_new = stamppresent 2092 valid_new = stamppresent