diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-07-19 11:56:07 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-21 08:41:12 +0100 |
commit | 9e8bbe7c6f83fe58d903bc43f09fafd6c6d25f14 (patch) | |
tree | f085dd0c0cc3c9331edc735f8f764ed717c6ad98 /bitbake/lib | |
parent | 7eb654cb4d82b54e3e4df0a57face61063b72c45 (diff) | |
download | poky-9e8bbe7c6f83fe58d903bc43f09fafd6c6d25f14.tar.gz |
bitbake: tinfoil: enable access to additional cached items
Add access to fn_provides, packages, packages_dynamic and rproviders on
the recipecache object. This requires an additional corresponding
command plumbing to be added.
(Bitbake rev: 3df9b7c615174a6557581f3cd157842a28f6bb26)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/command.py | 32 | ||||
-rw-r--r-- | bitbake/lib/bb/tinfoil.py | 8 |
2 files changed, 40 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 05803d6af0..0e0a35af69 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py | |||
@@ -312,6 +312,38 @@ class CommandsSync: | |||
312 | return command.cooker.recipecaches[mc].pkg_pepvpr | 312 | return command.cooker.recipecaches[mc].pkg_pepvpr |
313 | getRecipeVersions.readonly = True | 313 | getRecipeVersions.readonly = True |
314 | 314 | ||
315 | def getRecipeProvides(self, command, params): | ||
316 | try: | ||
317 | mc = params[0] | ||
318 | except IndexError: | ||
319 | mc = '' | ||
320 | return command.cooker.recipecaches[mc].fn_provides | ||
321 | getRecipeProvides.readonly = True | ||
322 | |||
323 | def getRecipePackages(self, command, params): | ||
324 | try: | ||
325 | mc = params[0] | ||
326 | except IndexError: | ||
327 | mc = '' | ||
328 | return command.cooker.recipecaches[mc].packages | ||
329 | getRecipePackages.readonly = True | ||
330 | |||
331 | def getRecipePackagesDynamic(self, command, params): | ||
332 | try: | ||
333 | mc = params[0] | ||
334 | except IndexError: | ||
335 | mc = '' | ||
336 | return command.cooker.recipecaches[mc].packages_dynamic | ||
337 | getRecipePackagesDynamic.readonly = True | ||
338 | |||
339 | def getRProviders(self, command, params): | ||
340 | try: | ||
341 | mc = params[0] | ||
342 | except IndexError: | ||
343 | mc = '' | ||
344 | return command.cooker.recipecaches[mc].rproviders | ||
345 | getRProviders.readonly = True | ||
346 | |||
315 | def getRuntimeDepends(self, command, params): | 347 | def getRuntimeDepends(self, command, params): |
316 | ret = [] | 348 | ret = [] |
317 | try: | 349 | try: |
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 2a51526187..456cbf80be 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -173,6 +173,14 @@ class TinfoilCookerAdapter: | |||
173 | attrvalue = self.tinfoil.run_command('getBbFilePriority') or {} | 173 | attrvalue = self.tinfoil.run_command('getBbFilePriority') or {} |
174 | elif name == 'pkg_dp': | 174 | elif name == 'pkg_dp': |
175 | attrvalue = self.tinfoil.run_command('getDefaultPreference') or {} | 175 | attrvalue = self.tinfoil.run_command('getDefaultPreference') or {} |
176 | elif name == 'fn_provides': | ||
177 | attrvalue = self.tinfoil.run_command('getRecipeProvides') or {} | ||
178 | elif name == 'packages': | ||
179 | attrvalue = self.tinfoil.run_command('getRecipePackages') or {} | ||
180 | elif name == 'packages_dynamic': | ||
181 | attrvalue = self.tinfoil.run_command('getRecipePackagesDynamic') or {} | ||
182 | elif name == 'rproviders': | ||
183 | attrvalue = self.tinfoil.run_command('getRProviders') or {} | ||
176 | else: | 184 | else: |
177 | raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name)) | 185 | raise AttributeError("%s instance has no attribute '%s'" % (self.__class__.__name__, name)) |
178 | 186 | ||