mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
create-spdx-2-2: Fix packagedata usage to work with SDK packages
There are two seperate PKGDATA_DIR directories, one for the target and one for the SDK. Rather than fail when a package can't be found, try the SDK first. We use a datastore copy to keep the code simple, rather than havng to parameterise all the packagedata functions. (From OE-Core rev: 701d8f975c89dc6753188fbcf9d4883650ba5b58) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -714,11 +714,16 @@ def collect_package_providers(d):
|
||||
deps.append((d.getVar("PN"), d.getVar("BB_HASHFILENAME")))
|
||||
|
||||
for dep_pn, dep_hashfn in deps:
|
||||
recipe_data = oe.packagedata.read_pkgdata(dep_pn, d)
|
||||
localdata = d
|
||||
recipe_data = oe.packagedata.read_pkgdata(dep_pn, localdata)
|
||||
if not recipe_data:
|
||||
localdata = bb.data.createCopy(d)
|
||||
localdata.setVar("PKGDATA_DIR", "${PKGDATA_DIR_SDK}")
|
||||
recipe_data = oe.packagedata.read_pkgdata(dep_pn, localdata)
|
||||
|
||||
for pkg in recipe_data.get("PACKAGES", "").split():
|
||||
|
||||
pkg_data = oe.packagedata.read_subpkgdata_dict(pkg, d)
|
||||
pkg_data = oe.packagedata.read_subpkgdata_dict(pkg, localdata)
|
||||
rprovides = set(n for n, _ in bb.utils.explode_dep_versions2(pkg_data.get("RPROVIDES", "")).items())
|
||||
rprovides.add(pkg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user