From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OecOF-0007q5-7A for garchives@archives.gentoo.org; Thu, 29 Jul 2010 23:20:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4CD9FE0B3A; Thu, 29 Jul 2010 23:19:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E662AE0B05 for ; Thu, 29 Jul 2010 23:19:42 +0000 (UTC) Received: from [192.168.148.241] (unknown [216.239.45.19]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPSA id 7C9711B4008 for ; Thu, 29 Jul 2010 23:19:42 +0000 (UTC) Message-ID: <4C520CB3.5000401@gentoo.org> Date: Thu, 29 Jul 2010 16:20:19 -0700 From: =?UTF-8?B?IlBhd2XFgiBIYWpkYW4sIEpyLiI=?= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 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 MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Locale check in python_pkg_setup() References: <201007300116.43653.Arfrever@gentoo.org> In-Reply-To: <201007300116.43653.Arfrever@gentoo.org> X-Enigmail-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig28765F0846630D310A71490C" X-Archives-Salt: 9e78032e-44a1-4e96-b698-2d3c46d63cbd X-Archives-Hash: 0da3de049d8c57b51b5dcbd3237097aa This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig28765F0846630D310A71490C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 7/29/10 4:16 PM, Arfrever Frehtes Taifersar Arahesis wrote: >=20 > --- python.eclass > +++ python.eclass > @@ -355,6 +355,8 @@ > # Check if phase is pkg_setup(). > [[ "${EBUILD_PHASE}" !=3D "setup" ]] && die "${FUNCNAME}() can be use= d only in pkg_setup() phase" > =20 > + local locale > + > if [[ "$#" -ne 0 ]]; then > die "${FUNCNAME}() does not accept arguments" > fi > @@ -407,6 +409,16 @@ > unset -f python_pkg_setup_check_USE_flags > fi nit: Why not declare "local locale" here, close to its usage? > + locale=3D"$(python -c 'import os; print(os.environ.get("LC_ALL", os.e= nviron.get("LC_CTYPE", os.environ.get("LANG", "POSIX"))))')" > + if [[ "${locale}" !=3D *.UTF-8 ]]; then > + eerror > + eerror "Currently used locale '${locale}' is unsupported and can cau= se build-time or run-time" > + eerror "problems (usually UnicodeDecodeErrors or UnicodeEncodeErrors= ). Bugs caused by this locale" > + eerror "will be closed as invalid. It is recommended to use a UTF-8 = locale to avoid problems." > + eerror "See http://www.gentoo.org/doc/en/utf-8.xml for information o= n how to fix locale." > + eerror > + fi > + > PYTHON_PKG_SETUP_EXECUTED=3D"1" > } > =20 --------------enig28765F0846630D310A71490C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) iEYEARECAAYFAkxSDLkACgkQuUQtlDBCeQKJuACdHtxUKWy4zOjwaCEw3do3Ijhw AyoAni8tRHLbWhEYAQ+ZWqho09ntWLzh =rebW -----END PGP SIGNATURE----- --------------enig28765F0846630D310A71490C--