lib/package: Copy locale license

When creating split locales, copy the license from LICENSE:${PN}-locale
if set, otherwise leave it unspecified (which will result in falling
back to LICENSE)

(From OE-Core rev: 34b844d3a920574d81affbdd2096ffd7dea14067)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2024-10-24 13:03:10 -06:00
committed by Richard Purdie
parent 3cabb0e170
commit f94bd6fe97

View File

@@ -663,6 +663,8 @@ def split_locales(d):
except ValueError:
locale_index = len(packages)
lic = d.getVar("LICENSE:" + pn + "-locale")
localepaths = []
locales = set()
for localepath in (d.getVar('LOCALE_PATHS') or "").split():
@@ -698,6 +700,8 @@ def split_locales(d):
d.setVar('RPROVIDES:' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln))
d.setVar('SUMMARY:' + pkg, '%s - %s translations' % (summary, l))
d.setVar('DESCRIPTION:' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l))
if lic:
d.setVar('LICENSE:' + pkg, lic)
if locale_section:
d.setVar('SECTION:' + pkg, locale_section)