diff options
Diffstat (limited to 'bitbake/lib/bb/tinfoil.py')
-rw-r--r-- | bitbake/lib/bb/tinfoil.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 8c9b6b8ca5..dccbe0ebb5 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -117,15 +117,16 @@ class TinfoilCookerAdapter: | |||
117 | 117 | ||
118 | class TinfoilCookerCollectionAdapter: | 118 | class TinfoilCookerCollectionAdapter: |
119 | """ cooker.collection adapter """ | 119 | """ cooker.collection adapter """ |
120 | def __init__(self, tinfoil): | 120 | def __init__(self, tinfoil, mc=''): |
121 | self.tinfoil = tinfoil | 121 | self.tinfoil = tinfoil |
122 | self.mc = mc | ||
122 | def get_file_appends(self, fn): | 123 | def get_file_appends(self, fn): |
123 | return self.tinfoil.get_file_appends(fn) | 124 | return self.tinfoil.get_file_appends(fn, self.mc) |
124 | def __getattr__(self, name): | 125 | def __getattr__(self, name): |
125 | if name == 'overlayed': | 126 | if name == 'overlayed': |
126 | return self.tinfoil.get_overlayed_recipes() | 127 | return self.tinfoil.get_overlayed_recipes(self.mc) |
127 | elif name == 'bbappends': | 128 | elif name == 'bbappends': |
128 | return self.tinfoil.run_command('getAllAppends') | 129 | return self.tinfoil.run_command('getAllAppends', self.mc) |
129 | else: | 130 | else: |
130 | raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name)) | 131 | raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name)) |
131 | 132 | ||
@@ -185,10 +186,11 @@ class TinfoilCookerAdapter: | |||
185 | 186 | ||
186 | def __init__(self, tinfoil): | 187 | def __init__(self, tinfoil): |
187 | self.tinfoil = tinfoil | 188 | self.tinfoil = tinfoil |
188 | self.collection = self.TinfoilCookerCollectionAdapter(tinfoil) | 189 | self.multiconfigs = [''] + (tinfoil.config_data.getVar('BBMULTICONFIG') or '').split() |
190 | self.collections = {} | ||
189 | self.recipecaches = {} | 191 | self.recipecaches = {} |
190 | self.recipecaches[''] = self.TinfoilRecipeCacheAdapter(tinfoil) | 192 | for mc in self.multiconfigs: |
191 | for mc in (tinfoil.config_data.getVar('BBMULTICONFIG') or '').split(): | 193 | self.collections[mc] = self.TinfoilCookerCollectionAdapter(tinfoil, mc) |
192 | self.recipecaches[mc] = self.TinfoilRecipeCacheAdapter(tinfoil, mc) | 194 | self.recipecaches[mc] = self.TinfoilRecipeCacheAdapter(tinfoil, mc) |
193 | self._cache = {} | 195 | self._cache = {} |
194 | def __getattr__(self, name): | 196 | def __getattr__(self, name): |
@@ -492,11 +494,11 @@ class Tinfoil: | |||
492 | raise Exception('Not connected to server (did you call .prepare()?)') | 494 | raise Exception('Not connected to server (did you call .prepare()?)') |
493 | return self.server_connection.events.waitEvent(timeout) | 495 | return self.server_connection.events.waitEvent(timeout) |
494 | 496 | ||
495 | def get_overlayed_recipes(self): | 497 | def get_overlayed_recipes(self, mc=''): |
496 | """ | 498 | """ |
497 | Find recipes which are overlayed (i.e. where recipes exist in multiple layers) | 499 | Find recipes which are overlayed (i.e. where recipes exist in multiple layers) |
498 | """ | 500 | """ |
499 | return defaultdict(list, self.run_command('getOverlayedRecipes')) | 501 | return defaultdict(list, self.run_command('getOverlayedRecipes', mc)) |
500 | 502 | ||
501 | def get_skipped_recipes(self): | 503 | def get_skipped_recipes(self): |
502 | """ | 504 | """ |
@@ -534,11 +536,11 @@ class Tinfoil: | |||
534 | raise bb.providers.NoProvider('Unable to find any recipe file matching "%s"' % pn) | 536 | raise bb.providers.NoProvider('Unable to find any recipe file matching "%s"' % pn) |
535 | return best[3] | 537 | return best[3] |
536 | 538 | ||
537 | def get_file_appends(self, fn): | 539 | def get_file_appends(self, fn, mc=''): |
538 | """ | 540 | """ |
539 | Find the bbappends for a recipe file | 541 | Find the bbappends for a recipe file |
540 | """ | 542 | """ |
541 | return self.run_command('getFileAppends', fn) | 543 | return self.run_command('getFileAppends', fn, mc) |
542 | 544 | ||
543 | def all_recipes(self, mc='', sort=True): | 545 | def all_recipes(self, mc='', sort=True): |
544 | """ | 546 | """ |