diff options
Diffstat (limited to 'bitbake/lib/bb/tinfoil.py')
| -rw-r--r-- | bitbake/lib/bb/tinfoil.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index dcd3910cc4..4dc4590c31 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
| @@ -188,11 +188,19 @@ class TinfoilCookerAdapter: | |||
| 188 | self._cache[name] = attrvalue | 188 | self._cache[name] = attrvalue |
| 189 | return attrvalue | 189 | return attrvalue |
| 190 | 190 | ||
| 191 | class TinfoilSkiplistByMcAdapter: | ||
| 192 | def __init__(self, tinfoil): | ||
| 193 | self.tinfoil = tinfoil | ||
| 194 | |||
| 195 | def __getitem__(self, mc): | ||
| 196 | return self.tinfoil.get_skipped_recipes(mc) | ||
| 197 | |||
| 191 | def __init__(self, tinfoil): | 198 | def __init__(self, tinfoil): |
| 192 | self.tinfoil = tinfoil | 199 | self.tinfoil = tinfoil |
| 193 | self.multiconfigs = [''] + (tinfoil.config_data.getVar('BBMULTICONFIG') or '').split() | 200 | self.multiconfigs = [''] + (tinfoil.config_data.getVar('BBMULTICONFIG') or '').split() |
| 194 | self.collections = {} | 201 | self.collections = {} |
| 195 | self.recipecaches = {} | 202 | self.recipecaches = {} |
| 203 | self.skiplist_by_mc = self.TinfoilSkiplistByMcAdapter(tinfoil) | ||
| 196 | for mc in self.multiconfigs: | 204 | for mc in self.multiconfigs: |
| 197 | self.collections[mc] = self.TinfoilCookerCollectionAdapter(tinfoil, mc) | 205 | self.collections[mc] = self.TinfoilCookerCollectionAdapter(tinfoil, mc) |
| 198 | self.recipecaches[mc] = self.TinfoilRecipeCacheAdapter(tinfoil, mc) | 206 | self.recipecaches[mc] = self.TinfoilRecipeCacheAdapter(tinfoil, mc) |
| @@ -201,8 +209,6 @@ class TinfoilCookerAdapter: | |||
| 201 | # Grab these only when they are requested since they aren't always used | 209 | # Grab these only when they are requested since they aren't always used |
| 202 | if name in self._cache: | 210 | if name in self._cache: |
| 203 | return self._cache[name] | 211 | return self._cache[name] |
| 204 | elif name == 'skiplist': | ||
| 205 | attrvalue = self.tinfoil.get_skipped_recipes() | ||
| 206 | elif name == 'bbfile_config_priorities': | 212 | elif name == 'bbfile_config_priorities': |
| 207 | ret = self.tinfoil.run_command('getLayerPriorities') | 213 | ret = self.tinfoil.run_command('getLayerPriorities') |
| 208 | bbfile_config_priorities = [] | 214 | bbfile_config_priorities = [] |
| @@ -514,12 +520,12 @@ class Tinfoil: | |||
| 514 | """ | 520 | """ |
| 515 | return defaultdict(list, self.run_command('getOverlayedRecipes', mc)) | 521 | return defaultdict(list, self.run_command('getOverlayedRecipes', mc)) |
| 516 | 522 | ||
| 517 | def get_skipped_recipes(self): | 523 | def get_skipped_recipes(self, mc=''): |
| 518 | """ | 524 | """ |
| 519 | Find recipes which were skipped (i.e. SkipRecipe was raised | 525 | Find recipes which were skipped (i.e. SkipRecipe was raised |
| 520 | during parsing). | 526 | during parsing). |
| 521 | """ | 527 | """ |
| 522 | return OrderedDict(self.run_command('getSkippedRecipes')) | 528 | return OrderedDict(self.run_command('getSkippedRecipes', mc)) |
| 523 | 529 | ||
| 524 | def get_all_providers(self, mc=''): | 530 | def get_all_providers(self, mc=''): |
| 525 | return defaultdict(list, self.run_command('allProviders', mc)) | 531 | return defaultdict(list, self.run_command('allProviders', mc)) |
| @@ -533,6 +539,7 @@ class Tinfoil: | |||
| 533 | def get_runtime_providers(self, rdep): | 539 | def get_runtime_providers(self, rdep): |
| 534 | return self.run_command('getRuntimeProviders', rdep) | 540 | return self.run_command('getRuntimeProviders', rdep) |
| 535 | 541 | ||
| 542 | # TODO: teach this method about mc | ||
| 536 | def get_recipe_file(self, pn): | 543 | def get_recipe_file(self, pn): |
| 537 | """ | 544 | """ |
| 538 | Get the file name for the specified recipe/target. Raises | 545 | Get the file name for the specified recipe/target. Raises |
| @@ -541,6 +548,7 @@ class Tinfoil: | |||
| 541 | """ | 548 | """ |
| 542 | best = self.find_best_provider(pn) | 549 | best = self.find_best_provider(pn) |
| 543 | if not best or (len(best) > 3 and not best[3]): | 550 | if not best or (len(best) > 3 and not best[3]): |
| 551 | # TODO: pass down mc | ||
| 544 | skiplist = self.get_skipped_recipes() | 552 | skiplist = self.get_skipped_recipes() |
| 545 | taskdata = bb.taskdata.TaskData(None, skiplist=skiplist) | 553 | taskdata = bb.taskdata.TaskData(None, skiplist=skiplist) |
| 546 | skipreasons = taskdata.get_reasons(pn) | 554 | skipreasons = taskdata.get_reasons(pn) |
