package.bbclass: add LICENSE_EXCLUSION to vardeps
PATCH 1/2 package.bbclass: add LICENSE_EXCLUSION to vardeps
From: Christopher Larson <[email protected]>
Ensure that changes to INCOMPATIBLE_LICENSE re-run do_package for affected recipes.
Signed-off-by Christopher Larson <[email protected]>
--- meta/classes/package.bbclass | 4 ++++ 1 file changed, 4 insertions(+)
meta/classes/package.bbclass +4 -0
@@ -1789,6 +1789,10 @@ def gen_packagevar(d): for p in pkgs: for v in vars: ret.append(v + "_" + p) + + # Ensure that changes to INCOMPATIBLE_LICENSE re-run do_package for + # affected recipes. + ret.append('LICENSE_EXCLUSION-%s' % p) return " ".join(ret) PACKAGE_PREPROCESS_FUNCS ?= ""
Signature · 1 line
1.8.2
PATCH 2/2 package.bbclass: ensure license excluded files aren't packaged
From: Christopher Larson <[email protected]>
An excluded package left its files behind, which meant they could end up in another package instead, meaning we could ship GPLv3 binaries even with GPLv3 in INCOMPATIBLE_LICENSE. Skip the files belonging to the excluded packages to prevent this from occurring.
Signed-off-by Christopher Larson <[email protected]>
--- meta/classes/package.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta/classes/package.bbclass +4 -1
@@ -925,7 +925,7 @@ python populate_packages () { for pkg in packages.split(): if d.getVar('LICENSE_EXCLUSION-' + pkg, True): bb.warn("%s has an incompatible license. Excluding from packaging." % pkg) - elif pkg in package_list: + if pkg in package_list: bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg) else: package_list.append(pkg)
@@ -965,6 +965,9 @@ python populate_packages () { continue seen.append(file) + if d.getVar('LICENSE_EXCLUSION-' + pkg, True): + continue + def mkdir(src, dest, p): src = os.path.join(src, p) dest = os.path.join(dest, p)
Signature · 1 line
1.8.2