summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorJate Sujjavanich <jatedev@gmail.comt>2022-07-06 17:15:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-15 12:29:17 +0100
commit35bcc28983205e42941541f3133f3ddc2124b2d6 (patch)
tree304620c3f532a86165200c7584f4241e221b35b3 /meta/lib
parent48ea7812c783cc759784686a8c5b95fe123e9973 (diff)
downloadpoky-35bcc28983205e42941541f3133f3ddc2124b2d6.tar.gz
IMAGE_LOCALES_ARCHIVE: add option to prevent locale archive creation
[YOCTO #14851] 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. Modified to work with code before move to lib/oe/package_manager (From OE-Core rev: af32908dfcebbc0f617ad828d895f504c37ee2d1) Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8d78b819c2ec33fce3a34254fa90864ee5fa7617) Signed-off-by: Jate Sujjavanich <jatedev@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package_manager.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index db988d9247..502dfbe3ed 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -611,12 +611,13 @@ class PackageManager(object, metaclass=ABCMeta):
611 "'%s' returned %d:\n%s" % 611 "'%s' returned %d:\n%s" %
612 (' '.join(cmd), e.returncode, e.output.decode("utf-8"))) 612 (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
613 613
614 target_arch = self.d.getVar('TARGET_ARCH') 614 if self.d.getVar('IMAGE_LOCALES_ARCHIVE') == '1':
615 localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale") 615 target_arch = self.d.getVar('TARGET_ARCH')
616 if os.path.exists(localedir) and os.listdir(localedir): 616 localedir = oe.path.join(self.target_rootfs, self.d.getVar("libdir"), "locale")
617 generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir) 617 if os.path.exists(localedir) and os.listdir(localedir):
618 # And now delete the binary locales 618 generate_locale_archive(self.d, self.target_rootfs, target_arch, localedir)
619 self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False) 619 # And now delete the binary locales
620 self.remove(fnmatch.filter(self.list_installed(), "glibc-binary-localedata-*"), False)
620 621
621 def deploy_dir_lock(self): 622 def deploy_dir_lock(self):
622 if self.deploy_dir is None: 623 if self.deploy_dir is None: