mirror of
https://git.yoctoproject.org/poky
synced 2026-07-16 03:47:03 +00:00
lib/packagedata.py: Add API to iterate over rprovides
Adds an API that makes it easier to iterate over the package data for a all providers of a runtime dependency. (From OE-Core rev: 68bdc219a4a819e83217f5b54c463624af8d3b9e) (From OE-Core rev: 579717212ba2892e32315788ccd65320556d32a3) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
3d029078fe
commit
6f26093d14
@@ -108,3 +108,18 @@ def recipename(pkg, d):
|
||||
"""Return the recipe name for the given binary package name."""
|
||||
|
||||
return pkgmap(d).get(pkg)
|
||||
|
||||
def foreach_runtime_provider_pkgdata(d, rdep, include_rdep=False):
|
||||
pkgdata_dir = d.getVar("PKGDATA_DIR")
|
||||
possibles = set()
|
||||
try:
|
||||
possibles |= set(os.listdir("%s/runtime-rprovides/%s/" % (pkgdata_dir, rdep)))
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
if include_rdep:
|
||||
possibles.add(rdep)
|
||||
|
||||
for p in sorted(list(possibles)):
|
||||
rdep_data = read_subpkgdata(p, d)
|
||||
yield p, rdep_data
|
||||
|
||||
Reference in New Issue
Block a user