From f9a697a2fd26e5ca7f0ea4eb153d4a3c2aafdbbe Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 25 Mar 2007 18:06:11 +0000 Subject: glibc, local.conf.sample: Introduce and handle new OE variable, GLIBC_GENERATE_LOCALES to limit set of generated binary locales. * 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, e.g.: GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 de_DE.UTF-8" * Check your distro for minimal set of locales required. Old-time default is "en_GB.UTF-8 de_DE.UTF-8 fr_FR.UTF-8". * Angstrom requires en_GB only. * This commit does not changes the default, which is still generation of all available locales. * Closes #1966. --- packages/glibc/glibc-package.bbclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'packages/glibc') 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("(.*)\.(.*)") -- cgit v1.2.3