Bug 14155 - yocto-check-layer fails with hash changes if license added
Summary: yocto-check-layer fails with hash changes if license added
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 3.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 5.1 M3
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-12-17 17:24 UTC by Ross Burton
Modified: 2024-08-06 09:59 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2020-12-17 17:24:24 UTC
If a layer adds a new license, for example:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-arm/tree/meta-arm-bsp/custom-licenses/STM-SLA0044-Rev5

And meta-oe is a dependent layer, then check-layers fails:

   lvm2:do_configure: b802854a81ce9143e8c0b7d9f839e3198222cde02dd8ebf831504d4af52d023f -> 2b5f9d7acaa8843a3624a9acfc50d8dbee24b33a826a793f9128fb65b59a01fc
      bitbake-diffsigs --task lvm2 do_configure --signature b802854a81ce9143e8c0b7d9f839e3198222cde02dd8ebf831504d4af52d023f 2b5f9d7acaa8843a3624a9acfc50d8dbee24b33a826a793f9128fb65b59a01fc
      NOTE: Starting bitbake server...
      basehash changed from 060c530f471b0b7646e598ca92c980518f98b5dec7a39bbf5c0d122adc61a8a5 to 043201e125c1ae9e4a84a09f0563a59352e636c77d9640fc936aa40994852671
      Variable AVAILABLE_LICENSES value changed:
      "... SSPL-1 {+STM-SLA0044-Rev5+} Simple-2.0 ..."

This is because the lvm2 recipe uses the license logic:

LVM2_PACKAGECONFIG_append_class-target = " \
    ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
    ${@incompatible_license_contains('GPLv3', '', 'thin-provisioning-tools', d)} \
"
Comment 1 Richard Purdie 2020-12-17 17:54:08 UTC
I think we need to change the licensing code so that AVAILABLE_LICENSES isn't used in these contexts. Maybe have a flag limiting it to core licenses for the purposes of the functions?
Comment 2 akuster 2020-12-23 19:44:47 UTC
would an override help? 

We force folks to use overrides or some sort of check for DISTRO_FEATURE to work around this
Comment 3 Armin Kuster 2020-12-24 18:37:31 UTC
triaging
Comment 4 Randy MacLeod 2023-02-02 15:15:00 UTC
Mingli, Please check if we still see this bug on master.
Comment 5 Randy MacLeod 2023-07-26 21:22:01 UTC
Bulk move of 64 bugs to 4.3 M3 after a quick review.
If a bug is actually fixed, please add a commit link and resolve it.
-- Randy for YP bug team.
Comment 6 Trevor Gamblin 2023-09-14 16:43:44 UTC
Moved to M4.
Comment 7 Randy MacLeod 2023-10-30 15:29:15 UTC
Bulk move to 5.0 M1. -- Randy
Comment 8 Randy MacLeod 2024-01-25 14:28:50 UTC
Bulk move of bugs owned by "unassigned" from 5.0-M2 to 5.0-M3.
Comment 9 Randy MacLeod 2024-02-22 17:58:44 UTC
Mingli, Please check if we still see this bug on master.
Comment 10 Randy MacLeod 2024-07-25 15:00:06 UTC
Richard thinks we got rid of the AVAILABLE license check.
Mingli, can you check on that?
Comment 11 Ross Burton 2024-08-06 09:59:59 UTC
AVAILABLE_LICENSES was removed in oe-core bf08d9ccb9cbc749a571af3d33140bcae0e252a6.