Rename INCOMPATIBLE related varibale
RFC PATCH 1/1 Rename INCOMPATIBLE related varibale
This is one option to handle the rename, another alternative would be to change the new INCOMPATIBLE_LICENSE_ALLOWED_RECIPES to VarFlag style.
--- meta/classes/base.bbclass | 4 ++-- meta/classes/license_image.bbclass | 2 +- meta/classes/multilib.bbclass | 6 +++--- meta/conf/distro/include/default-distrovars.inc | 2 +- meta/lib/oeqa/selftest/cases/incompatible_lic.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-)
meta/classes/base.bbclass +2 -2
@@ -598,9 +598,9 @@ python () { whitelist = [] for lic in bad_licenses: spdx_license = return_spdx(d, lic) - whitelist.extend((d.getVar("WHITELIST_" + lic) or "").split()) + whitelist.extend((d.getVar("INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_" + lic) or "").split()) if spdx_license: - whitelist.extend((d.getVar("WHITELIST_" + spdx_license) or "").split()) + whitelist.extend((d.getVar("INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_" + spdx_license) or "").split()) if pn in whitelist: '''
meta/classes/license_image.bbclass +1 -1
@@ -56,7 +56,7 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True): whitelist = [] for lic in bad_licenses: - whitelist.extend((d.getVar("WHITELIST_" + lic) or "").split()) + whitelist.extend((d.getVar("INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_" + lic) or "").split()) with open(license_manifest, "w") as license_file: for pkg in sorted(pkg_dic):
meta/classes/multilib.bbclass +3 -3
@@ -75,11 +75,11 @@ python multilib_virtclass_handler () { e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override) - # Expand WHITELIST_GPL-3.0 with multilib prefix - pkgs = e.data.getVar("WHITELIST_GPL-3.0") + # Expand INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_GPL-3.0 with multilib prefix + pkgs = e.data.getVar("INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_GPL-3.0") for pkg in pkgs.split(): pkgs += " " + variant + "-" + pkg - e.data.setVar("WHITELIST_GPL-3.0", pkgs) + e.data.setVar("INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_GPL-3.0", pkgs) # DEFAULTTUNE can change TARGET_ARCH override so expand this now before update_data newtune = e.data.getVar("DEFAULTTUNE:" + "virtclass-multilib-" + variant, False)
meta/conf/distro/include/default-distrovars.inc +1 -1
@@ -20,7 +20,7 @@ DISTRO_FEATURES_DEFAULT ?= "acl alsa argp bluetooth debuginfod ext2 ipv4 ipv6 la DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}" IMAGE_FEATURES ?= "" -WHITELIST_GPL-3.0 ?= "" +INCOMPATIBLE_LICENSE_ALLOWED_RECIPE_GPL-3.0 ?= "" COMMERCIAL_AUDIO_PLUGINS ?= "" # COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
meta/lib/oeqa/selftest/cases/incompatible_lic.py +1 -1
@@ -111,7 +111,7 @@ INCOMPATIBLE_LICENSE:pn-core-image-minimal = "GPL-3.0 LGPL-3.0" bitbake('core-image-minimal') def test_bash_whitelist(self): - self.write_config(self.default_config() + '\nWHITELIST_GPL-3.0:pn-core-image-minimal = "bash"') + self.write_config(self.default_config() + '\nINCOMPATIBLE_LICENSE_ALLOWED_RECIPE_GPL-3.0:pn-core-image-minimal = "bash"') bitbake('core-image-minimal')
Signature · 1 line
2.25.1
Quoted 3 lines · Saul Wold
This is one option to handle the rename, another alternative would be to change the new
INCOMPATIBLE_LICENSE_ALLOWED_RECIPESto VarFlag style.
It is one option but I'm not sure it makes sense. This functionality is a bit of a historical relic and the syntax is absolutely horrible. If we're going to change it, I'd like to take the opportunity to step back and fix it somehow. I've not spent the time thinking what that might look like unfortunately.
Cheers,
Richard
Quoted 19 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Richard Purdie
Sent: den 17 februari 2022 11:44
To: Saul Wold <[email protected]>; openembedded- [email protected]
Subject: Re: [OE-core] [RFC PATCH] Rename INCOMPATIBLE related varibaleQuoted 3 lines · Saul Wold
This is one option to handle the rename, another alternative would be to change the new
INCOMPATIBLE_LICENSE_ALLOWED_RECIPESto VarFlag style.It is one option but I'm not sure it makes sense. This functionality is a bit of a historical relic and the syntax is absolutely horrible. If we're going to change it, I'd like to take the opportunity to step back and fix it somehow. I've not spent the time thinking what that might look like unfortunately.
Quoted 3 lines
Cheers,
Richard
I definitely agree that the system for handling compatible/incompatible licenses need to be reworked. I sent a longish response to Jon's mail on the yocto list January 29 where I discussed this.
//Peter