summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/local.conf.sample6
-rw-r--r--packages/glibc/glibc-package.bbclass11
2 files changed, 14 insertions, 3 deletions
diff --git a/conf/local.conf.sample b/conf/local.conf.sample
index 02d54686f8..daffdda6de 100644
--- a/conf/local.conf.sample
+++ b/conf/local.conf.sample
@@ -90,6 +90,12 @@ PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
# ENABLE_BINARY_LOCALE_GENERATION = "0"
# ASSUME_PROVIDED += "qemu-native"
+# If ENABLE_BINARY_LOCALE_GENERATION is set to "1", you can limit locales
+# generated to the list provided by GLIBC_GENERATE_LOCALES. This is huge
+# time-savior for developmental builds. Format: list of locale.encoding pairs
+# with spaces as separators.
+# GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 de_DE.UTF-8"
+
# Uncomment this to select a particular major kernel version if the MACHINE setting
# supports more than one major kernel version. Currently this is suported by the
# following MACHINE types: poodle, tosa and simpad.
diff --git a/packages/glibc/glibc-package.bbclass b/packages/glibc/glibc-package.bbclass
index 5783ab1fcf..4bd4223657 100644
--- a/packages/glibc/glibc-package.bbclass
+++ b/packages/glibc/glibc-package.bbclass
@@ -202,9 +202,14 @@ python package_do_split_gconvs () {
do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d)
- f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r")
- supported = f.readlines()
- f.close()
+ supported = bb.data.getVar('GLIBC_GENERATE_LOCALES', d, 1)
+ if not supported or supported == "all":
+ f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r")
+ supported = f.readlines()
+ f.close()
+ else:
+ supported = supported.split()
+ supported = map(lambda s:s.replace(".", " ") + "\n", supported)
dot_re = re.compile("(.*)\.(.*)")