classes/create-spdx-2.2: Respect PKG for providers

If a package renames itself using PKG, the new name should be respected
as a name that the recipe provides.

(From OE-Core rev: 871f48126180bf30c001c6b97268cee1853dbda2)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2023-05-30 10:12:11 -05:00
committed by Richard Purdie
parent 42071227f6
commit af0136ee4e

View File

@@ -688,6 +688,10 @@ def collect_package_providers(d):
rprovides = set(n for n, _ in bb.utils.explode_dep_versions2(pkg_data.get("RPROVIDES", "")).items())
rprovides.add(pkg)
if "PKG" in pkg_data:
pkg = pkg_data["PKG"]
rprovides.add(pkg)
for r in rprovides:
providers[r] = (pkg, dep_hashfn)