Bug 13917 - yocto-check-layer can fail if a layer adds new licenses
Summary: yocto-check-layer can fail if a layer adds new licenses
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 5.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-05-22 08:53 UTC by Joshua Watt
Modified: 2026-05-18 13:36 UTC (History)
4 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 Joshua Watt 2020-05-22 08:53:28 UTC
If a layer adds new licenses by appending to LICENSE_PATH, it will cause any recipe that inherits "license.bbclass" to fail because that class expands the AVAILABLE_LICENSE variable by scanning all paths listed in LICENSE_PATH. This results in a signature mismatch for the recipe.

As an example when running yocto-check-layers on one of our internal layers which adds a custom license file, we got the following error:

71 signatures changed, initial differences (first hash before, second after):
   libdevmapper:do_configure: 82c851ad59f13117fc0f9cf68732d3e4b187f150baa08af99c4d6ebad5d56b8a -> cd43c102864ed6ee6a8727d002e59a68b8898cdabff801dfffcbf1f237c9fddf
      bitbake-diffsigs --task libdevmapper do_configure --signature 82c851ad59f13117fc0f9cf68732d3e4b187f150baa08af99c4d6ebad5d56b8a cd43c102864ed6ee6a8727d002e59a68b8898cdabff801dfffcbf1f237c9fddf
      NOTE: Starting bitbake server...
      basehash changed from c09082cab215faf830a4bd4cc68275b97fd408eda66668723874095268701964 to 2542be418520358049adb0a46e46166f7d614fd2756175b0544b1fa4b964717b
      Variable AVAILABLE_LICENSES value changed:
      "... {+Module-License-Fraunhofer+} ..."


There appear to be two recipes that currently inherit license.bbclass: libdevmapper and lvm2 (both of which get it from lvm2.inc)
Comment 1 Randy MacLeod 2023-04-21 18:45:43 UTC
Moved en masse from 4.2 to 4.3 by Randy.
Comment 2 Paul Barker 2026-05-18 13:36:21 UTC
We dropped AVAILABLE_LICENSES in 2022 (commit bf08d9ccb9cbc749a571af3d33140bcae0e252a6), and LICENSE_PATH is included in BB_HASHEXCLUDE_COMMON. So this should no longer be an issue. I tested with meta-raspberrypi which includes a custom license directory added to LICENSE_PATH in layer.conf, this currently passes yocto-check-layer (without the --machines argument).

So, I think we can close this issue.