Skip to content

Incompatible Licenses in Dynamic Packages

Joshua Watt openembedded-core 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v24 patches 5 repliesSuperseded
  3. v14 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4classes-global/license: Move functions to library codemeta/classes-global/base.bbclass meta/classes-global/license.bbclass meta/classes-recipe/license_image.bbclass +1 more+175 -1770 replies
2/4lib: license: Move package license skip to librarymeta/classes-global/base.bbclass meta/lib/oe/license.py+43 -310 replies
3/4lib: package: Check incompatible licenses at packaging timemeta/classes-global/base.bbclass meta/classes-global/package.bbclass meta/lib/oe/package.py+3 -80 replies
4/4lib: package: Copy locale licensemeta/lib/oe/package.py+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [OE-core][PATCH v3 0/4] Incompatible Licenses in Dynamic Packages

I noticed that INCOMPATIBLE_LICENSE was not applying *-locale-* packages at packaging time like other packages. This meant that if there were *-locale-* packages with an incompatible license, they would still be generated, and then the final image would likely fail when the packages were added to it. This is actually not just a problem with *-locale-* packages, but in fact any packages generated dynamically.

To fix this for all cases, the code to detect incompatible licenses in packages is moved to a library function, and instead of using the '_exclude-incompatible-' variable to transfer this knowledge from base.bbclass to do_package, the library function is called a second time in do_package. While slightly less efficient, this means that do_package is checking the actual final list of packages for license exclusions, make it accurate even when dynamic packages are added.

Finally, the last patch makes it possible to set the LICENSE field of the generated *-locale-* packages, by making them match LICENSE:${PN}-locale, if set. This provides a means for recipe writes to affect the license of the split locale packages in the event that it doesn't match the recipe LICENSE. This makes logical sense to me, but please let me know if I'm missing some important assumption

v3: Fixed several bugs that were accidentally omitted from the previous patch series, and feedback.

Joshua Watt (4):
classes-global/license: Move functions to library code
lib: license: Move package license skip to library
lib: package: Check incompatible licenses at packaging time
lib: package: Copy locale license

 meta/classes-global/base.bbclass          |  42 +----
 meta/classes-global/license.bbclass       | 165 ------------------
 meta/classes-global/package.bbclass       |   4 -
 meta/classes-recipe/license_image.bbclass |  14 +-
 meta/lib/oe/license.py                    | 202 ++++++++++++++++++++++
 meta/lib/oe/package.py                    |  10 +-
 6 files changed, 223 insertions(+), 214 deletions(-)
Signature · 1 line
2.46.2