summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Thalmeier <michael.thalmeier@hale.at>2020-10-12 08:41:43 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-13 09:42:08 +0100
commitacc22a275361b79bfe6bc9886d323542cec383b5 (patch)
treeaa82e1af3d0afa1c796e40c04d112e7a06e793a6
parenta1f503df6ed9555ba678787f506cf2858b82ed96 (diff)
downloadpoky-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>
-rw-r--r--meta/classes/image.bbclass5
-rw-r--r--meta/lib/oe/package_manager/__init__.py13
2 files changed, 11 insertions, 7 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 730c843c18..045f4494c8 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -121,7 +121,7 @@ python () {
121def rootfs_variables(d): 121def rootfs_variables(d):
122 from oe.rootfs import variable_depends 122 from oe.rootfs import variable_depends
123 variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE', 123 variables = ['IMAGE_DEVICE_TABLE','IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
124 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', 'IMAGE_LINGUAS_COMPLEMENTARY', 124 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS', 'IMAGE_LINGUAS_COMPLEMENTARY', 'IMAGE_LOCALES_ARCHIVE',
125 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS', 125 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS',
126 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS', 126 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
127 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY', 'REPRODUCIBLE_TIMESTAMP_ROOTFS', 'IMAGE_INSTALL_DEBUGFS'] 127 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY', 'REPRODUCIBLE_TIMESTAMP_ROOTFS', 'IMAGE_INSTALL_DEBUGFS']
@@ -173,6 +173,9 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
173 173
174LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS').split()))}" 174LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS').split()))}"
175 175
176# per default create a locale archive
177IMAGE_LOCALES_ARCHIVE ?= '1'
178
176# Prefer image, but use the fallback files for lookups if the image ones 179# Prefer image, but use the fallback files for lookups if the image ones
177# aren't yet available. 180# aren't yet available.
178PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}" 181PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"
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: