mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 06:49:33 +02: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) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
af61f98f00
commit
dd5475d8e3
@@ -116,6 +116,21 @@ def recipename(pkg, d):
|
|||||||
|
|
||||||
return pkgmap(d).get(pkg)
|
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
|
||||||
|
|
||||||
def get_package_mapping(pkg, basepkg, d, depversions=None):
|
def get_package_mapping(pkg, basepkg, d, depversions=None):
|
||||||
import oe.packagedata
|
import oe.packagedata
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user