Patchwork [2/6] libc-package: fix handling for 'precompiled' locales

login
register
mail settings
Submitter Christopher Larson
Date April 17, 2012, 3:45 p.m.
Message ID <3289f0b2fa5773360ba3e5a61697ad3c7c1b3ebc.1334677440.git.kergoth@gmail.com>
Download mbox | patch
Permalink /patch/26065/
State New
Headers show

Comments

Christopher Larson - April 17, 2012, 3:45 p.m.
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 <kergoth@gmail.com>
---
 meta/classes/libc-package.bbclass |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

Patch

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)