|
@@ -188,11 +188,19 @@ class TinfoilCookerAdapter:
|
|
|
self._cache[name] = attrvalue
|
|
|
return attrvalue
|
|
|
|
|
|
+ class TinfoilSkiplistByMcAdapter:
|
|
|
+ def __init__(self, tinfoil):
|
|
|
+ self.tinfoil = tinfoil
|
|
|
+
|
|
|
+ def __getitem__(self, mc):
|
|
|
+ return self.tinfoil.get_skipped_recipes(mc)
|
|
|
+
|
|
|
def __init__(self, tinfoil):
|
|
|
self.tinfoil = tinfoil
|
|
|
self.multiconfigs = [''] + (tinfoil.config_data.getVar('BBMULTICONFIG') or '').split()
|
|
|
self.collections = {}
|
|
|
self.recipecaches = {}
|
|
|
+ self.skiplist_by_mc = self.TinfoilSkiplistByMcAdapter(tinfoil)
|
|
|
for mc in self.multiconfigs:
|
|
|
self.collections[mc] = self.TinfoilCookerCollectionAdapter(tinfoil, mc)
|
|
|
self.recipecaches[mc] = self.TinfoilRecipeCacheAdapter(tinfoil, mc)
|
|
@@ -201,8 +209,6 @@ class TinfoilCookerAdapter:
|
|
|
# Grab these only when they are requested since they aren't always used
|
|
|
if name in self._cache:
|
|
|
return self._cache[name]
|
|
|
- elif name == 'skiplist':
|
|
|
- attrvalue = self.tinfoil.get_skipped_recipes()
|
|
|
elif name == 'bbfile_config_priorities':
|
|
|
ret = self.tinfoil.run_command('getLayerPriorities')
|
|
|
bbfile_config_priorities = []
|
|
@@ -514,12 +520,12 @@ class Tinfoil:
|
|
|
"""
|
|
|
return defaultdict(list, self.run_command('getOverlayedRecipes', mc))
|
|
|
|
|
|
- def get_skipped_recipes(self):
|
|
|
+ def get_skipped_recipes(self, mc=''):
|
|
|
"""
|
|
|
Find recipes which were skipped (i.e. SkipRecipe was raised
|
|
|
during parsing).
|
|
|
"""
|
|
|
- return OrderedDict(self.run_command('getSkippedRecipes'))
|
|
|
+ return OrderedDict(self.run_command('getSkippedRecipes', mc))
|
|
|
|
|
|
def get_all_providers(self, mc=''):
|
|
|
return defaultdict(list, self.run_command('allProviders', mc))
|
|
@@ -533,6 +539,7 @@ class Tinfoil:
|
|
|
def get_runtime_providers(self, rdep):
|
|
|
return self.run_command('getRuntimeProviders', rdep)
|
|
|
|
|
|
+ # TODO: teach this method about mc
|
|
|
def get_recipe_file(self, pn):
|
|
|
"""
|
|
|
Get the file name for the specified recipe/target. Raises
|
|
@@ -541,6 +548,7 @@ class Tinfoil:
|
|
|
"""
|
|
|
best = self.find_best_provider(pn)
|
|
|
if not best or (len(best) > 3 and not best[3]):
|
|
|
+ # TODO: pass down mc
|
|
|
skiplist = self.get_skipped_recipes()
|
|
|
taskdata = bb.taskdata.TaskData(None, skiplist=skiplist)
|
|
|
skipreasons = taskdata.get_reasons(pn)
|