diff options
author | Michael Thalmeier <michael.thalmeier@hale.at> | 2020-10-12 08:41:43 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-13 09:42:08 +0100 |
commit | acc22a275361b79bfe6bc9886d323542cec383b5 (patch) | |
tree | aa82e1af3d0afa1c796e40c04d112e7a06e793a6 /meta/lib | |
parent | a1f503df6ed9555ba678787f506cf2858b82ed96 (diff) | |
download | poky-acc22a275361b79bfe6bc9886d323542cec383b5.tar.gz |
IMAGE_LOCALES_ARCHIVE: add option to prevent locale archive creation
Under some circumstances it is not desirable to create a combined locale
archive (/usr/lib/locale/locale-archive).
The new variable IMAGE_LOCALES_ARCHIVE defaults to '1', so the default
behaviour is not changed.
(From OE-Core rev: 8d78b819c2ec33fce3a34254fa90864ee5fa7617)
Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/package_manager/__init__.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py index 865d6f9493..42225a3b2e 100644 --- a/meta/lib/oe/package_manager/__init__.py +++ b/meta/lib/oe/package_manager/__init__.py | |||
@@ -397,12 +397,13 @@ class PackageManager(object, metaclass=ABCMeta): | |||
397 | "'%s' returned %d:\n%s" % | 397 | "'%s' returned %d:\n%s" % |
398 | (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) | 398 | (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) |
399 | 399 | ||
400 | target_arch = self.d.getVar('TARGET_ARCH') | 400 | if self.d.getVar('IMAGE_LOCALES_ARCHIVE') == '1': |
401 | localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale") | 401 | target_arch = self.d.getVar('TARGET_ARCH') |
402 | if os.path.exists(localedir) and os.listdir(localedir): | 402 | localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale") |
403 | generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir) | 403 | if os.path.exists(localedir) and os.listdir(localedir): |
404 | # And now delete the binary locales | 404 | generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir) |
405 | self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False) | 405 | # And now delete the binary locales |
406 | self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False) | ||
406 | 407 | ||
407 | def deploy_dir_lock(self): | 408 | def deploy_dir_lock(self): |
408 | if self.deploy_dir is None: | 409 | if self.deploy_dir is None: |