From patchwork Mon Apr 16 20:43:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/7] libc-package: fix handling for 'precompiled' locales Date: Mon, 16 Apr 2012 20:43:59 -0000 From: Christopher Larson X-Patchwork-Id: 25965 Message-Id: <3289f0b2fa5773360ba3e5a61697ad3c7c1b3ebc.1334608810.git.kergoth@gmail.com> To: openembedded-core@lists.openembedded.org Due to how the 'supported' locales were being generated (added ' ' twice for locales with '.' in them), one could end up with the locale-base packages in your PACKAGES twice, causing packaging problems with eglibc-locale. Signed-off-by: Christopher Larson --- meta/classes/libc-package.bbclass | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index bb4ba68..65feae2 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -221,11 +221,13 @@ python package_do_split_gconvs () { supported = [] full_bin_path = d.getVar('PKGD', True) + binary_locales_dir for dir in os.listdir(full_bin_path): - dbase = dir.split(".") - d2 = " " - if len(dbase) > 1: - d2 = "." + dbase[1].upper() + " " - supported.append(dbase[0] + d2) + elements = dir.split('.', 1) + locale = elements[0] + if len(elements) > 1: + charset = elements[1] + else: + charset = '' + supported.append('%s %s\n' % (locale, charset)) # Collate the locales by base and encoding utf8_only = int(d.getVar('LOCALE_UTF8_ONLY', True) or 0)