diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/package.py | 14 |
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") |