diff options
| -rwxr-xr-x | bitbake/bin/bitbake-layers | 14 | ||||
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 138 | ||||
| -rw-r--r-- | bitbake/lib/bb/tinfoil.py | 4 |
3 files changed, 78 insertions, 78 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index 06156e6a88..0c4ac2d497 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers | |||
| @@ -89,7 +89,7 @@ class Commands(cmd.Cmd): | |||
| 89 | for layerdir in self.bblayers: | 89 | for layerdir in self.bblayers: |
| 90 | layername = self.get_layer_name(layerdir) | 90 | layername = self.get_layer_name(layerdir) |
| 91 | layerpri = 0 | 91 | layerpri = 0 |
| 92 | for layer, _, regex, pri in self.bbhandler.cooker.recpiecache.bbfile_config_priorities: | 92 | for layer, _, regex, pri in self.bbhandler.cooker.recipecache.bbfile_config_priorities: |
| 93 | if regex.match(os.path.join(layerdir, 'test')): | 93 | if regex.match(os.path.join(layerdir, 'test')): |
| 94 | layerpri = pri | 94 | layerpri = pri |
| 95 | break | 95 | break |
| @@ -225,9 +225,9 @@ Options: | |||
| 225 | 225 | ||
| 226 | 226 | ||
| 227 | def list_recipes(self, title, pnspec, show_overlayed_only, show_same_ver_only, show_filenames, show_multi_provider_only): | 227 | def list_recipes(self, title, pnspec, show_overlayed_only, show_same_ver_only, show_filenames, show_multi_provider_only): |
| 228 | pkg_pn = self.bbhandler.cooker.recpiecache.pkg_pn | 228 | pkg_pn = self.bbhandler.cooker.recipecache.pkg_pn |
| 229 | (latest_versions, preferred_versions) = bb.providers.findProviders(self.bbhandler.cooker.configuration.data, self.bbhandler.cooker.recpiecache, pkg_pn) | 229 | (latest_versions, preferred_versions) = bb.providers.findProviders(self.bbhandler.cooker.configuration.data, self.bbhandler.cooker.recipecache, pkg_pn) |
| 230 | allproviders = bb.providers.allProviders(self.bbhandler.cooker.recpiecache) | 230 | allproviders = bb.providers.allProviders(self.bbhandler.cooker.recipecache) |
| 231 | 231 | ||
| 232 | # Ensure we list skipped recipes | 232 | # Ensure we list skipped recipes |
| 233 | # We are largely guessing about PN, PV and the preferred version here, | 233 | # We are largely guessing about PN, PV and the preferred version here, |
| @@ -426,7 +426,7 @@ build results (as the layer priority order has effectively changed). | |||
| 426 | # have come from) | 426 | # have come from) |
| 427 | first_regex = None | 427 | first_regex = None |
| 428 | layerdir = layers[0] | 428 | layerdir = layers[0] |
| 429 | for layername, pattern, regex, _ in self.bbhandler.cooker.recpiecache.bbfile_config_priorities: | 429 | for layername, pattern, regex, _ in self.bbhandler.cooker.recipecache.bbfile_config_priorities: |
| 430 | if regex.match(os.path.join(layerdir, 'test')): | 430 | if regex.match(os.path.join(layerdir, 'test')): |
| 431 | first_regex = regex | 431 | first_regex = regex |
| 432 | break | 432 | break |
| @@ -456,7 +456,7 @@ build results (as the layer priority order has effectively changed). | |||
| 456 | logger.warning("File %s does not match the flattened layer's BBFILES setting, you may need to edit conf/layer.conf or move the file elsewhere" % f1full) | 456 | logger.warning("File %s does not match the flattened layer's BBFILES setting, you may need to edit conf/layer.conf or move the file elsewhere" % f1full) |
| 457 | 457 | ||
| 458 | def get_file_layer(self, filename): | 458 | def get_file_layer(self, filename): |
| 459 | for layer, _, regex, _ in self.bbhandler.cooker.recpiecache.bbfile_config_priorities: | 459 | for layer, _, regex, _ in self.bbhandler.cooker.recipecache.bbfile_config_priorities: |
| 460 | if regex.match(filename): | 460 | if regex.match(filename): |
| 461 | for layerdir in self.bblayers: | 461 | for layerdir in self.bblayers: |
| 462 | if regex.match(os.path.join(layerdir, 'test')) and re.match(layerdir, filename): | 462 | if regex.match(os.path.join(layerdir, 'test')) and re.match(layerdir, filename): |
| @@ -464,7 +464,7 @@ build results (as the layer priority order has effectively changed). | |||
| 464 | return "?" | 464 | return "?" |
| 465 | 465 | ||
| 466 | def get_file_layerdir(self, filename): | 466 | def get_file_layerdir(self, filename): |
| 467 | for layer, _, regex, _ in self.bbhandler.cooker.recpiecache.bbfile_config_priorities: | 467 | for layer, _, regex, _ in self.bbhandler.cooker.recipecache.bbfile_config_priorities: |
| 468 | if regex.match(filename): | 468 | if regex.match(filename): |
| 469 | for layerdir in self.bblayers: | 469 | for layerdir in self.bblayers: |
| 470 | if regex.match(os.path.join(layerdir, 'test')) and re.match(layerdir, filename): | 470 | if regex.match(os.path.join(layerdir, 'test')) and re.match(layerdir, filename): |
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 36b83cc4fd..affe1136c4 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -88,7 +88,7 @@ class BBCooker: | |||
| 88 | """ | 88 | """ |
| 89 | 89 | ||
| 90 | def __init__(self, configuration, server_registration_cb, savedenv={}): | 90 | def __init__(self, configuration, server_registration_cb, savedenv={}): |
| 91 | self.recpiecache = None | 91 | self.recipecache = None |
| 92 | self.skiplist = {} | 92 | self.skiplist = {} |
| 93 | 93 | ||
| 94 | self.server_registration_cb = server_registration_cb | 94 | self.server_registration_cb = server_registration_cb |
| @@ -304,9 +304,9 @@ class BBCooker: | |||
| 304 | nice = int(nice) - curnice | 304 | nice = int(nice) - curnice |
| 305 | buildlog.verbose("Renice to %s " % os.nice(nice)) | 305 | buildlog.verbose("Renice to %s " % os.nice(nice)) |
| 306 | 306 | ||
| 307 | if self.recpiecache: | 307 | if self.recipecache: |
| 308 | del self.recpiecache | 308 | del self.recipecache |
| 309 | self.recpiecache = bb.cache.CacheData(self.caches_array) | 309 | self.recipecache = bb.cache.CacheData(self.caches_array) |
| 310 | 310 | ||
| 311 | self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) ) | 311 | self.handleCollections( self.configuration.data.getVar("BBFILE_COLLECTIONS", True) ) |
| 312 | 312 | ||
| @@ -359,8 +359,8 @@ class BBCooker: | |||
| 359 | 359 | ||
| 360 | def showVersions(self): | 360 | def showVersions(self): |
| 361 | 361 | ||
| 362 | pkg_pn = self.recpiecache.pkg_pn | 362 | pkg_pn = self.recipecache.pkg_pn |
| 363 | (latest_versions, preferred_versions) = bb.providers.findProviders(self.configuration.data, self.recpiecache, pkg_pn) | 363 | (latest_versions, preferred_versions) = bb.providers.findProviders(self.configuration.data, self.recipecache, pkg_pn) |
| 364 | 364 | ||
| 365 | logger.plain("%-35s %25s %25s", "Recipe Name", "Latest Version", "Preferred Version") | 365 | logger.plain("%-35s %25s %25s", "Recipe Name", "Latest Version", "Preferred Version") |
| 366 | logger.plain("%-35s %25s %25s\n", "===========", "==============", "=================") | 366 | logger.plain("%-35s %25s %25s\n", "===========", "==============", "=================") |
| @@ -402,8 +402,8 @@ class BBCooker: | |||
| 402 | bb.data.expandKeys(localdata) | 402 | bb.data.expandKeys(localdata) |
| 403 | 403 | ||
| 404 | taskdata = bb.taskdata.TaskData(self.configuration.abort) | 404 | taskdata = bb.taskdata.TaskData(self.configuration.abort) |
| 405 | taskdata.add_provider(localdata, self.recpiecache, pkgs_to_build[0]) | 405 | taskdata.add_provider(localdata, self.recipecache, pkgs_to_build[0]) |
| 406 | taskdata.add_unresolved(localdata, self.recpiecache) | 406 | taskdata.add_unresolved(localdata, self.recipecache) |
| 407 | 407 | ||
| 408 | targetid = taskdata.getbuild_id(pkgs_to_build[0]) | 408 | targetid = taskdata.getbuild_id(pkgs_to_build[0]) |
| 409 | fnid = taskdata.build_targets[targetid][0] | 409 | fnid = taskdata.build_targets[targetid][0] |
| @@ -457,11 +457,11 @@ class BBCooker: | |||
| 457 | runlist = [] | 457 | runlist = [] |
| 458 | current = 0 | 458 | current = 0 |
| 459 | for k in pkgs_to_build: | 459 | for k in pkgs_to_build: |
| 460 | taskdata.add_provider(localdata, self.recpiecache, k) | 460 | taskdata.add_provider(localdata, self.recipecache, k) |
| 461 | runlist.append([k, "do_%s" % task]) | 461 | runlist.append([k, "do_%s" % task]) |
| 462 | current += 1 | 462 | current += 1 |
| 463 | bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(pkgs_to_build)), self.configuration.data) | 463 | bb.event.fire(bb.event.TreeDataPreparationProgress(current, len(pkgs_to_build)), self.configuration.data) |
| 464 | taskdata.add_unresolved(localdata, self.recpiecache) | 464 | taskdata.add_unresolved(localdata, self.recipecache) |
| 465 | bb.event.fire(bb.event.TreeDataPreparationCompleted(len(pkgs_to_build)), self.configuration.data) | 465 | bb.event.fire(bb.event.TreeDataPreparationCompleted(len(pkgs_to_build)), self.configuration.data) |
| 466 | return runlist, taskdata | 466 | return runlist, taskdata |
| 467 | 467 | ||
| @@ -473,7 +473,7 @@ class BBCooker: | |||
| 473 | information. | 473 | information. |
| 474 | """ | 474 | """ |
| 475 | runlist, taskdata = self.prepareTreeData(pkgs_to_build, task) | 475 | runlist, taskdata = self.prepareTreeData(pkgs_to_build, task) |
| 476 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.recpiecache, taskdata, runlist) | 476 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.recipecache, taskdata, runlist) |
| 477 | rq.rqdata.prepare() | 477 | rq.rqdata.prepare() |
| 478 | 478 | ||
| 479 | seen_fnids = [] | 479 | seen_fnids = [] |
| @@ -490,15 +490,15 @@ class BBCooker: | |||
| 490 | taskname = rq.rqdata.runq_task[task] | 490 | taskname = rq.rqdata.runq_task[task] |
| 491 | fnid = rq.rqdata.runq_fnid[task] | 491 | fnid = rq.rqdata.runq_fnid[task] |
| 492 | fn = taskdata.fn_index[fnid] | 492 | fn = taskdata.fn_index[fnid] |
| 493 | pn = self.recpiecache.pkg_fn[fn] | 493 | pn = self.recipecache.pkg_fn[fn] |
| 494 | version = "%s:%s-%s" % self.recpiecache.pkg_pepvpr[fn] | 494 | version = "%s:%s-%s" % self.recipecache.pkg_pepvpr[fn] |
| 495 | if pn not in depend_tree["pn"]: | 495 | if pn not in depend_tree["pn"]: |
| 496 | depend_tree["pn"][pn] = {} | 496 | depend_tree["pn"][pn] = {} |
| 497 | depend_tree["pn"][pn]["filename"] = fn | 497 | depend_tree["pn"][pn]["filename"] = fn |
| 498 | depend_tree["pn"][pn]["version"] = version | 498 | depend_tree["pn"][pn]["version"] = version |
| 499 | for dep in rq.rqdata.runq_depends[task]: | 499 | for dep in rq.rqdata.runq_depends[task]: |
| 500 | depfn = taskdata.fn_index[rq.rqdata.runq_fnid[dep]] | 500 | depfn = taskdata.fn_index[rq.rqdata.runq_fnid[dep]] |
| 501 | deppn = self.recpiecache.pkg_fn[depfn] | 501 | deppn = self.recipecache.pkg_fn[depfn] |
| 502 | dotname = "%s.%s" % (pn, rq.rqdata.runq_task[task]) | 502 | dotname = "%s.%s" % (pn, rq.rqdata.runq_task[task]) |
| 503 | if not dotname in depend_tree["tdepends"]: | 503 | if not dotname in depend_tree["tdepends"]: |
| 504 | depend_tree["tdepends"][dotname] = [] | 504 | depend_tree["tdepends"][dotname] = [] |
| @@ -515,14 +515,14 @@ class BBCooker: | |||
| 515 | for rdep in taskdata.rdepids[fnid]: | 515 | for rdep in taskdata.rdepids[fnid]: |
| 516 | depend_tree["rdepends-pn"][pn].append(taskdata.run_names_index[rdep]) | 516 | depend_tree["rdepends-pn"][pn].append(taskdata.run_names_index[rdep]) |
| 517 | 517 | ||
| 518 | rdepends = self.recpiecache.rundeps[fn] | 518 | rdepends = self.recipecache.rundeps[fn] |
| 519 | for package in rdepends: | 519 | for package in rdepends: |
| 520 | depend_tree["rdepends-pkg"][package] = [] | 520 | depend_tree["rdepends-pkg"][package] = [] |
| 521 | for rdepend in rdepends[package]: | 521 | for rdepend in rdepends[package]: |
| 522 | depend_tree["rdepends-pkg"][package].append(rdepend) | 522 | depend_tree["rdepends-pkg"][package].append(rdepend) |
| 523 | packages.append(package) | 523 | packages.append(package) |
| 524 | 524 | ||
| 525 | rrecs = self.recpiecache.runrecs[fn] | 525 | rrecs = self.recipecache.runrecs[fn] |
| 526 | for package in rrecs: | 526 | for package in rrecs: |
| 527 | depend_tree["rrecs-pkg"][package] = [] | 527 | depend_tree["rrecs-pkg"][package] = [] |
| 528 | for rdepend in rrecs[package]: | 528 | for rdepend in rrecs[package]: |
| @@ -561,19 +561,19 @@ class BBCooker: | |||
| 561 | for task in xrange(len(tasks_fnid)): | 561 | for task in xrange(len(tasks_fnid)): |
| 562 | fnid = tasks_fnid[task] | 562 | fnid = tasks_fnid[task] |
| 563 | fn = taskdata.fn_index[fnid] | 563 | fn = taskdata.fn_index[fnid] |
| 564 | pn = self.recpiecache.pkg_fn[fn] | 564 | pn = self.recipecache.pkg_fn[fn] |
| 565 | version = "%s:%s-%s" % self.recpiecache.pkg_pepvpr[fn] | 565 | version = "%s:%s-%s" % self.recipecache.pkg_pepvpr[fn] |
| 566 | summary = self.recpiecache.summary[fn] | 566 | summary = self.recipecache.summary[fn] |
| 567 | lic = self.recpiecache.license[fn] | 567 | lic = self.recipecache.license[fn] |
| 568 | section = self.recpiecache.section[fn] | 568 | section = self.recipecache.section[fn] |
| 569 | description = self.recpiecache.description[fn] | 569 | description = self.recipecache.description[fn] |
| 570 | homepage = self.recpiecache.homepage[fn] | 570 | homepage = self.recipecache.homepage[fn] |
| 571 | bugtracker = self.recpiecache.bugtracker[fn] | 571 | bugtracker = self.recipecache.bugtracker[fn] |
| 572 | files_info = self.recpiecache.files_info[fn] | 572 | files_info = self.recipecache.files_info[fn] |
| 573 | rdepends = self.recpiecache.rundeps[fn] | 573 | rdepends = self.recipecache.rundeps[fn] |
| 574 | rrecs = self.recpiecache.runrecs[fn] | 574 | rrecs = self.recipecache.runrecs[fn] |
| 575 | prevision = self.recpiecache.prevision[fn] | 575 | prevision = self.recipecache.prevision[fn] |
| 576 | inherits = self.recpiecache.inherits.get(fn, None) | 576 | inherits = self.recipecache.inherits.get(fn, None) |
| 577 | if pn not in depend_tree["pn"]: | 577 | if pn not in depend_tree["pn"]: |
| 578 | depend_tree["pn"][pn] = {} | 578 | depend_tree["pn"][pn] = {} |
| 579 | depend_tree["pn"][pn]["filename"] = fn | 579 | depend_tree["pn"][pn]["filename"] = fn |
| @@ -599,7 +599,7 @@ class BBCooker: | |||
| 599 | if targetid in taskdata.build_targets and taskdata.build_targets[targetid]: | 599 | if targetid in taskdata.build_targets and taskdata.build_targets[targetid]: |
| 600 | id = taskdata.build_targets[targetid][0] | 600 | id = taskdata.build_targets[targetid][0] |
| 601 | fn_provider = taskdata.fn_index[id] | 601 | fn_provider = taskdata.fn_index[id] |
| 602 | pn_provider = self.recpiecache.pkg_fn[fn_provider] | 602 | pn_provider = self.recipecache.pkg_fn[fn_provider] |
| 603 | else: | 603 | else: |
| 604 | pn_provider = item | 604 | pn_provider = item |
| 605 | depend_tree["depends"][pn].append(pn_provider) | 605 | depend_tree["depends"][pn].append(pn_provider) |
| @@ -612,7 +612,7 @@ class BBCooker: | |||
| 612 | if targetid in taskdata.run_targets and taskdata.run_targets[targetid]: | 612 | if targetid in taskdata.run_targets and taskdata.run_targets[targetid]: |
| 613 | id = taskdata.run_targets[targetid][0] | 613 | id = taskdata.run_targets[targetid][0] |
| 614 | fn_rprovider = taskdata.fn_index[id] | 614 | fn_rprovider = taskdata.fn_index[id] |
| 615 | pn_rprovider = self.recpiecache.pkg_fn[fn_rprovider] | 615 | pn_rprovider = self.recipecache.pkg_fn[fn_rprovider] |
| 616 | else: | 616 | else: |
| 617 | pn_rprovider = item | 617 | pn_rprovider = item |
| 618 | depend_tree["rdepends-pn"][pn].append(pn_rprovider) | 618 | depend_tree["rdepends-pn"][pn].append(pn_rprovider) |
| @@ -693,7 +693,7 @@ class BBCooker: | |||
| 693 | 693 | ||
| 694 | def show_appends_with_no_recipes( self ): | 694 | def show_appends_with_no_recipes( self ): |
| 695 | recipes = set(os.path.basename(f) | 695 | recipes = set(os.path.basename(f) |
| 696 | for f in self.recpiecache.pkg_fn.iterkeys()) | 696 | for f in self.recipecache.pkg_fn.iterkeys()) |
| 697 | recipes |= set(os.path.basename(f) | 697 | recipes |= set(os.path.basename(f) |
| 698 | for f in self.skiplist.iterkeys()) | 698 | for f in self.skiplist.iterkeys()) |
| 699 | appended_recipes = self.collection.appendlist.iterkeys() | 699 | appended_recipes = self.collection.appendlist.iterkeys() |
| @@ -725,9 +725,9 @@ class BBCooker: | |||
| 725 | except: | 725 | except: |
| 726 | providerlog.critical("Malformed option in PREFERRED_PROVIDERS variable: %s" % p) | 726 | providerlog.critical("Malformed option in PREFERRED_PROVIDERS variable: %s" % p) |
| 727 | continue | 727 | continue |
| 728 | if providee in self.recpiecache.preferred and self.recpiecache.preferred[providee] != provider: | 728 | if providee in self.recipecache.preferred and self.recipecache.preferred[providee] != provider: |
| 729 | providerlog.error("conflicting preferences for %s: both %s and %s specified", providee, provider, self.recpiecache.preferred[providee]) | 729 | providerlog.error("conflicting preferences for %s: both %s and %s specified", providee, provider, self.recipecache.preferred[providee]) |
| 730 | self.recpiecache.preferred[providee] = provider | 730 | self.recipecache.preferred[providee] = provider |
| 731 | 731 | ||
| 732 | def findCoreBaseFiles(self, subdir, configfile): | 732 | def findCoreBaseFiles(self, subdir, configfile): |
| 733 | corebase = self.configuration.data.getVar('COREBASE', True) or "" | 733 | corebase = self.configuration.data.getVar('COREBASE', True) or "" |
| @@ -824,10 +824,10 @@ class BBCooker: | |||
| 824 | """ | 824 | """ |
| 825 | pkg_list = [] | 825 | pkg_list = [] |
| 826 | 826 | ||
| 827 | for pfn in self.recpiecache.pkg_fn: | 827 | for pfn in self.recipecache.pkg_fn: |
| 828 | inherits = self.recpiecache.inherits.get(pfn, None) | 828 | inherits = self.recipecache.inherits.get(pfn, None) |
| 829 | if inherits and inherits.count(klass) > 0: | 829 | if inherits and inherits.count(klass) > 0: |
| 830 | pkg_list.append(self.recpiecache.pkg_fn[pfn]) | 830 | pkg_list.append(self.recipecache.pkg_fn[pfn]) |
| 831 | 831 | ||
| 832 | return pkg_list | 832 | return pkg_list |
| 833 | 833 | ||
| @@ -854,22 +854,22 @@ class BBCooker: | |||
| 854 | Build package list for "bitbake world" | 854 | Build package list for "bitbake world" |
| 855 | """ | 855 | """ |
| 856 | parselog.debug(1, "collating packages for \"world\"") | 856 | parselog.debug(1, "collating packages for \"world\"") |
| 857 | for f in self.recpiecache.possible_world: | 857 | for f in self.recipecache.possible_world: |
| 858 | terminal = True | 858 | terminal = True |
| 859 | pn = self.recpiecache.pkg_fn[f] | 859 | pn = self.recipecache.pkg_fn[f] |
| 860 | 860 | ||
| 861 | for p in self.recpiecache.pn_provides[pn]: | 861 | for p in self.recipecache.pn_provides[pn]: |
| 862 | if p.startswith('virtual/'): | 862 | if p.startswith('virtual/'): |
| 863 | parselog.debug(2, "World build skipping %s due to %s provider starting with virtual/", f, p) | 863 | parselog.debug(2, "World build skipping %s due to %s provider starting with virtual/", f, p) |
| 864 | terminal = False | 864 | terminal = False |
| 865 | break | 865 | break |
| 866 | for pf in self.recpiecache.providers[p]: | 866 | for pf in self.recipecache.providers[p]: |
| 867 | if self.recpiecache.pkg_fn[pf] != pn: | 867 | if self.recipecache.pkg_fn[pf] != pn: |
| 868 | parselog.debug(2, "World build skipping %s due to both us and %s providing %s", f, pf, p) | 868 | parselog.debug(2, "World build skipping %s due to both us and %s providing %s", f, pf, p) |
| 869 | terminal = False | 869 | terminal = False |
| 870 | break | 870 | break |
| 871 | if terminal: | 871 | if terminal: |
| 872 | self.recpiecache.world_target.add(pn) | 872 | self.recipecache.world_target.add(pn) |
| 873 | 873 | ||
| 874 | def interactiveMode( self ): | 874 | def interactiveMode( self ): |
| 875 | """Drop off into a shell""" | 875 | """Drop off into a shell""" |
| @@ -955,7 +955,7 @@ class BBCooker: | |||
| 955 | def handleCollections( self, collections ): | 955 | def handleCollections( self, collections ): |
| 956 | """Handle collections""" | 956 | """Handle collections""" |
| 957 | errors = False | 957 | errors = False |
| 958 | self.recpiecache.bbfile_config_priorities = [] | 958 | self.recipecache.bbfile_config_priorities = [] |
| 959 | if collections: | 959 | if collections: |
| 960 | collection_priorities = {} | 960 | collection_priorities = {} |
| 961 | collection_depends = {} | 961 | collection_depends = {} |
| @@ -1045,7 +1045,7 @@ class BBCooker: | |||
| 1045 | parselog.error("BBFILE_PATTERN_%s \"%s\" is not a valid regular expression", c, regex) | 1045 | parselog.error("BBFILE_PATTERN_%s \"%s\" is not a valid regular expression", c, regex) |
| 1046 | errors = True | 1046 | errors = True |
| 1047 | continue | 1047 | continue |
| 1048 | self.recpiecache.bbfile_config_priorities.append((c, regex, cre, collection_priorities[c])) | 1048 | self.recipecache.bbfile_config_priorities.append((c, regex, cre, collection_priorities[c])) |
| 1049 | if errors: | 1049 | if errors: |
| 1050 | # We've already printed the actual error(s) | 1050 | # We've already printed the actual error(s) |
| 1051 | raise CollectionError("Errors during parsing layer configuration") | 1051 | raise CollectionError("Errors during parsing layer configuration") |
| @@ -1065,7 +1065,7 @@ class BBCooker: | |||
| 1065 | if bf.startswith("/") or bf.startswith("../"): | 1065 | if bf.startswith("/") or bf.startswith("../"): |
| 1066 | bf = os.path.abspath(bf) | 1066 | bf = os.path.abspath(bf) |
| 1067 | 1067 | ||
| 1068 | self.collection = CookerCollectFiles(self.recpiecache.bbfile_config_priorities) | 1068 | self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities) |
| 1069 | filelist, masked = self.collection.collect_bbfiles(self.configuration.data, self.configuration.event_data) | 1069 | filelist, masked = self.collection.collect_bbfiles(self.configuration.data, self.configuration.event_data) |
| 1070 | try: | 1070 | try: |
| 1071 | os.stat(bf) | 1071 | os.stat(bf) |
| @@ -1119,7 +1119,7 @@ class BBCooker: | |||
| 1119 | 1119 | ||
| 1120 | self.buildSetVars() | 1120 | self.buildSetVars() |
| 1121 | 1121 | ||
| 1122 | self.recpiecache = bb.cache.CacheData(self.caches_array) | 1122 | self.recipecache = bb.cache.CacheData(self.caches_array) |
| 1123 | infos = bb.cache.Cache.parse(fn, self.collection.get_file_appends(fn), \ | 1123 | infos = bb.cache.Cache.parse(fn, self.collection.get_file_appends(fn), \ |
| 1124 | self.configuration.data, | 1124 | self.configuration.data, |
| 1125 | self.caches_array) | 1125 | self.caches_array) |
| @@ -1134,27 +1134,27 @@ class BBCooker: | |||
| 1134 | if info_array[0].skipped: | 1134 | if info_array[0].skipped: |
| 1135 | bb.fatal("%s was skipped: %s" % (fn, info_array[0].skipreason)) | 1135 | bb.fatal("%s was skipped: %s" % (fn, info_array[0].skipreason)) |
| 1136 | 1136 | ||
| 1137 | self.recpiecache.add_from_recipeinfo(fn, info_array) | 1137 | self.recipecache.add_from_recipeinfo(fn, info_array) |
| 1138 | 1138 | ||
| 1139 | # Tweak some variables | 1139 | # Tweak some variables |
| 1140 | item = info_array[0].pn | 1140 | item = info_array[0].pn |
| 1141 | self.recpiecache.ignored_dependencies = set() | 1141 | self.recipecache.ignored_dependencies = set() |
| 1142 | self.recpiecache.bbfile_priority[fn] = 1 | 1142 | self.recipecache.bbfile_priority[fn] = 1 |
| 1143 | 1143 | ||
| 1144 | # Remove external dependencies | 1144 | # Remove external dependencies |
| 1145 | self.recpiecache.task_deps[fn]['depends'] = {} | 1145 | self.recipecache.task_deps[fn]['depends'] = {} |
| 1146 | self.recpiecache.deps[fn] = [] | 1146 | self.recipecache.deps[fn] = [] |
| 1147 | self.recpiecache.rundeps[fn] = [] | 1147 | self.recipecache.rundeps[fn] = [] |
| 1148 | self.recpiecache.runrecs[fn] = [] | 1148 | self.recipecache.runrecs[fn] = [] |
| 1149 | 1149 | ||
| 1150 | # Invalidate task for target if force mode active | 1150 | # Invalidate task for target if force mode active |
| 1151 | if self.configuration.force: | 1151 | if self.configuration.force: |
| 1152 | logger.verbose("Invalidate task %s, %s", task, fn) | 1152 | logger.verbose("Invalidate task %s, %s", task, fn) |
| 1153 | bb.parse.siggen.invalidate_task('do_%s' % task, self.recpiecache, fn) | 1153 | bb.parse.siggen.invalidate_task('do_%s' % task, self.recipecache, fn) |
| 1154 | 1154 | ||
| 1155 | # Setup taskdata structure | 1155 | # Setup taskdata structure |
| 1156 | taskdata = bb.taskdata.TaskData(self.configuration.abort) | 1156 | taskdata = bb.taskdata.TaskData(self.configuration.abort) |
| 1157 | taskdata.add_provider(self.configuration.data, self.recpiecache, item) | 1157 | taskdata.add_provider(self.configuration.data, self.recipecache, item) |
| 1158 | 1158 | ||
| 1159 | buildname = self.configuration.data.getVar("BUILDNAME") | 1159 | buildname = self.configuration.data.getVar("BUILDNAME") |
| 1160 | bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.configuration.event_data) | 1160 | bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.configuration.event_data) |
| @@ -1162,7 +1162,7 @@ class BBCooker: | |||
| 1162 | # Execute the runqueue | 1162 | # Execute the runqueue |
| 1163 | runlist = [[item, "do_%s" % task]] | 1163 | runlist = [[item, "do_%s" % task]] |
| 1164 | 1164 | ||
| 1165 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.recpiecache, taskdata, runlist) | 1165 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.recipecache, taskdata, runlist) |
| 1166 | 1166 | ||
| 1167 | def buildFileIdle(server, rq, abort): | 1167 | def buildFileIdle(server, rq, abort): |
| 1168 | 1168 | ||
| @@ -1238,11 +1238,11 @@ class BBCooker: | |||
| 1238 | 1238 | ||
| 1239 | runlist = [] | 1239 | runlist = [] |
| 1240 | for k in targets: | 1240 | for k in targets: |
| 1241 | taskdata.add_provider(localdata, self.recpiecache, k) | 1241 | taskdata.add_provider(localdata, self.recipecache, k) |
| 1242 | runlist.append([k, "do_%s" % task]) | 1242 | runlist.append([k, "do_%s" % task]) |
| 1243 | taskdata.add_unresolved(localdata, self.recpiecache) | 1243 | taskdata.add_unresolved(localdata, self.recipecache) |
| 1244 | 1244 | ||
| 1245 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.recpiecache, taskdata, runlist) | 1245 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.recipecache, taskdata, runlist) |
| 1246 | if universe: | 1246 | if universe: |
| 1247 | rq.rqdata.warn_multi_bb = True | 1247 | rq.rqdata.warn_multi_bb = True |
| 1248 | 1248 | ||
| @@ -1279,12 +1279,12 @@ class BBCooker: | |||
| 1279 | self.parseConfiguration () | 1279 | self.parseConfiguration () |
| 1280 | 1280 | ||
| 1281 | ignore = self.configuration.data.getVar("ASSUME_PROVIDED", True) or "" | 1281 | ignore = self.configuration.data.getVar("ASSUME_PROVIDED", True) or "" |
| 1282 | self.recpiecache.ignored_dependencies = set(ignore.split()) | 1282 | self.recipecache.ignored_dependencies = set(ignore.split()) |
| 1283 | 1283 | ||
| 1284 | for dep in self.configuration.extra_assume_provided: | 1284 | for dep in self.configuration.extra_assume_provided: |
| 1285 | self.recpiecache.ignored_dependencies.add(dep) | 1285 | self.recipecache.ignored_dependencies.add(dep) |
| 1286 | 1286 | ||
| 1287 | self.collection = CookerCollectFiles(self.recpiecache.bbfile_config_priorities) | 1287 | self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities) |
| 1288 | (filelist, masked) = self.collection.collect_bbfiles(self.configuration.data, self.configuration.event_data) | 1288 | (filelist, masked) = self.collection.collect_bbfiles(self.configuration.data, self.configuration.event_data) |
| 1289 | 1289 | ||
| 1290 | self.configuration.data.renameVar("__depends", "__base_depends") | 1290 | self.configuration.data.renameVar("__depends", "__base_depends") |
| @@ -1298,7 +1298,7 @@ class BBCooker: | |||
| 1298 | sys.exit(1) | 1298 | sys.exit(1) |
| 1299 | self.show_appends_with_no_recipes() | 1299 | self.show_appends_with_no_recipes() |
| 1300 | self.handlePrefProviders() | 1300 | self.handlePrefProviders() |
| 1301 | self.recpiecache.bbfile_priority = self.collection.collection_priorities(self.recpiecache.pkg_fn) | 1301 | self.recipecache.bbfile_priority = self.collection.collection_priorities(self.recipecache.pkg_fn) |
| 1302 | self.state = state.running | 1302 | self.state = state.running |
| 1303 | return None | 1303 | return None |
| 1304 | 1304 | ||
| @@ -1312,14 +1312,14 @@ class BBCooker: | |||
| 1312 | if 'world' in pkgs_to_build: | 1312 | if 'world' in pkgs_to_build: |
| 1313 | self.buildWorldTargetList() | 1313 | self.buildWorldTargetList() |
| 1314 | pkgs_to_build.remove('world') | 1314 | pkgs_to_build.remove('world') |
| 1315 | for t in self.recpiecache.world_target: | 1315 | for t in self.recipecache.world_target: |
| 1316 | pkgs_to_build.append(t) | 1316 | pkgs_to_build.append(t) |
| 1317 | 1317 | ||
| 1318 | if 'universe' in pkgs_to_build: | 1318 | if 'universe' in pkgs_to_build: |
| 1319 | parselog.warn("The \"universe\" target is only intended for testing and may produce errors.") | 1319 | parselog.warn("The \"universe\" target is only intended for testing and may produce errors.") |
| 1320 | parselog.debug(1, "collating packages for \"universe\"") | 1320 | parselog.debug(1, "collating packages for \"universe\"") |
| 1321 | pkgs_to_build.remove('universe') | 1321 | pkgs_to_build.remove('universe') |
| 1322 | for t in self.recpiecache.universe_target: | 1322 | for t in self.recipecache.universe_target: |
| 1323 | pkgs_to_build.append(t) | 1323 | pkgs_to_build.append(t) |
| 1324 | 1324 | ||
| 1325 | return pkgs_to_build | 1325 | return pkgs_to_build |
| @@ -1837,7 +1837,7 @@ class CookerParser(object): | |||
| 1837 | if info_array[0].skipped: | 1837 | if info_array[0].skipped: |
| 1838 | self.skipped += 1 | 1838 | self.skipped += 1 |
| 1839 | self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0]) | 1839 | self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0]) |
| 1840 | self.bb_cache.add_info(virtualfn, info_array, self.cooker.recpiecache, | 1840 | self.bb_cache.add_info(virtualfn, info_array, self.cooker.recipecache, |
| 1841 | parsed=parsed) | 1841 | parsed=parsed) |
| 1842 | return True | 1842 | return True |
| 1843 | 1843 | ||
| @@ -1846,4 +1846,4 @@ class CookerParser(object): | |||
| 1846 | self.cooker.collection.get_file_appends(filename), | 1846 | self.cooker.collection.get_file_appends(filename), |
| 1847 | self.cfgdata, self.cooker.caches_array) | 1847 | self.cfgdata, self.cooker.caches_array) |
| 1848 | for vfn, info_array in infos: | 1848 | for vfn, info_array in infos: |
| 1849 | self.cooker.recpiecache.add_from_recipeinfo(vfn, info_array) | 1849 | self.cooker.recipecache.add_from_recipeinfo(vfn, info_array) |
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 3379853628..56ce54f6b9 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
| @@ -71,13 +71,13 @@ class Tinfoil: | |||
| 71 | self.logger.setLevel(logging.INFO) | 71 | self.logger.setLevel(logging.INFO) |
| 72 | sys.stderr.write("done.\n") | 72 | sys.stderr.write("done.\n") |
| 73 | 73 | ||
| 74 | self.cooker_data = self.cooker.recpiecache | 74 | self.cooker_data = self.cooker.recipecache |
| 75 | 75 | ||
| 76 | def prepare(self, config_only = False): | 76 | def prepare(self, config_only = False): |
| 77 | if not self.cooker_data: | 77 | if not self.cooker_data: |
| 78 | if config_only: | 78 | if config_only: |
| 79 | self.cooker.parseConfiguration() | 79 | self.cooker.parseConfiguration() |
| 80 | self.cooker_data = self.cooker.recpiecache | 80 | self.cooker_data = self.cooker.recipecache |
| 81 | else: | 81 | else: |
| 82 | self.parseRecipes() | 82 | self.parseRecipes() |
| 83 | 83 | ||
