From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id F3AA01384B4 for ; Mon, 30 Nov 2015 21:40:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E817D21C039; Mon, 30 Nov 2015 21:40:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EB1EA21C00B for ; Mon, 30 Nov 2015 21:40:09 +0000 (UTC) Received: from naomi.gilbertsystems.net (d192-24-148-25.try.wideopenwest.com [24.192.25.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 938BD34069F for ; Mon, 30 Nov 2015 21:40:08 +0000 (UTC) From: Mike Gilbert To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH] python-utils-r1.eclass: Change python_export_utf8_locale to deal with LC_ALL=C Date: Mon, 30 Nov 2015 16:40:04 -0500 Message-Id: <1448919604-9820-1-git-send-email-floppym@gentoo.org> X-Mailer: git-send-email 2.6.3 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: c05cf982-858d-4330-959b-cafd6b55d86a X-Archives-Hash: 46f7dea77e9567bc3fc2576ce73bcea0 Paludis sets LC_ALL=C to ensure a 'sane' build environment. We only want to override LC_CTYPE, so we break LC_ALL into separate LC_* overrides and set LC_ALL to blank. --- eclass/python-utils-r1.eclass | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index b163fd8..024e093 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1189,19 +1189,27 @@ python_export_utf8_locale() { type locale >/dev/null || return 0 if [[ $(locale charmap) != UTF-8 ]]; then - if [[ -n ${LC_ALL} ]]; then - ewarn "LC_ALL is set to a locale with a charmap other than UTF-8." - ewarn "This may trigger build failures in some python packages." - return 1 - fi - # Try English first, then everything else. local lang locales="en_US.UTF-8 $(locale -a)" for lang in ${locales}; do - if [[ $(LC_CTYPE=${lang} locale charmap 2>/dev/null) == UTF-8 ]]; then + if [[ $(LC_ALL=${lang} locale charmap 2>/dev/null) == UTF-8 ]]; then if _python_check_locale_sanity "${lang}"; then export LC_CTYPE=${lang} + if [[ -n ${LC_ALL} ]]; then + export LC_NUMERIC=${LC_ALL} + export LC_TIME=${LC_ALL} + export LC_COLLATE=${LC_ALL} + export LC_MONETARY=${LC_ALL} + export LC_MESSAGES=${LC_ALL} + export LC_PAPER=${LC_ALL} + export LC_NAME=${LC_ALL} + export LC_ADDRESS=${LC_ALL} + export LC_TELEPHONE=${LC_ALL} + export LC_MEASUREMENT=${LC_ALL} + export LC_IDENTIFICATION=${LC_ALL} + export LC_ALL= + fi return 0 fi fi -- 2.6.3