summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorJonathan GUILLOT <jonathan@joggee.fr>2024-02-19 16:19:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-24 16:10:22 +0000
commitca25926d07c0f5a31cd04cff99185dab8a896b7e (patch)
treef8f206a1443d771550558bf5138c4dac46505809 /meta/lib/oe
parent396bc832b75f5f83184367994305d28c6a186b09 (diff)
downloadpoky-ca25926d07c0f5a31cd04cff99185dab8a896b7e.tar.gz
lib/oe/package: fix LOCALE_PATHS scan to create locale packages
split_locales() must only check subdirectories in paths added to LOCALE_PATHS to avoid creating weird packages based on filenames also present in paths. Without such a filter, cups recipe adding ${datadir}/cups/templates to LOCALE_PATHS creates the following incorrect packages: - cups-locale-add-class.tmpl - cups-locale-add-printer.tmpl - cups-locale-admin.tmpl (From OE-Core rev: ba3aee0d516bd066829d6edaa8d7bacdd75dd6ef) Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/package.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index d1738d3b61..587810bdaf 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -652,11 +652,15 @@ def split_locales(d):
652 locales = set() 652 locales = set()
653 for localepath in (d.getVar('LOCALE_PATHS') or "").split(): 653 for localepath in (d.getVar('LOCALE_PATHS') or "").split():
654 localedir = dvar + localepath 654 localedir = dvar + localepath
655 if cpath.isdir(localedir): 655 if not cpath.isdir(localedir):
656 locales.update(os.listdir(localedir)) 656 bb.debug(1, 'No locale files in %s' % localepath)
657 localepaths.append(localepath) 657 continue
658 else: 658
659 bb.debug(1, "No locale files in %s" % localepath) 659 localepaths.append(localepath)
660 with os.scandir(localedir) as it:
661 for entry in it:
662 if entry.is_dir():
663 locales.add(entry.name)
660 664
661 if len(locales) == 0: 665 if len(locales) == 0:
662 bb.debug(1, "No locale files in this package") 666 bb.debug(1, "No locale files in this package")