diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 26 |
1 files changed, 12 insertions, 14 deletions
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 |