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 1OefLi-0007MC-R9 for garchives@archives.gentoo.org; Fri, 30 Jul 2010 02:29:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0BCDE0961; Fri, 30 Jul 2010 02:29:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 75709E091B for ; Fri, 30 Jul 2010 02:29:00 +0000 (UTC) Received: from afta-gentoo.localnet (ip-85-198-235-97.broker.com.pl [85.198.235.97]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPSA id D916B1B41AD for ; Fri, 30 Jul 2010 02:28:59 +0000 (UTC) From: Arfrever Frehtes Taifersar Arahesis To: Gentoo Development Subject: Re: [gentoo-dev] Locale check in python_pkg_setup() Date: Fri, 30 Jul 2010 04:29:09 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.34-tuxonice-r1-AFTA; KDE/4.4.5; x86_64; ; ) References: <201007300116.43653.Arfrever@gentoo.org> <4C520CB3.5000401@gentoo.org> In-Reply-To: <4C520CB3.5000401@gentoo.org> 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 Content-Type: multipart/signed; boundary="nextPart1556518.T4sfAZVjL3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201007300429.44119.Arfrever@gentoo.org> X-Archives-Salt: d28ab1ad-e747-442f-b070-f93a274b26e6 X-Archives-Hash: 66bd38ad26518f671803f38954dac9ba --nextPart1556518.T4sfAZVjL3 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 2010-07-30 01:20:19 Pawe=C5=82 Hajdan, Jr. napisa=C5=82(a): > 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 >=20 > nit: Why not declare "local locale" here, close to its usage? It's consistent with style used in python.eclass. > > + 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 =2D-=20 Arfrever Frehtes Taifersar Arahesis --nextPart1556518.T4sfAZVjL3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABAgAGBQJMUjkXAAoJEFU3/w1zlLfgl5MQAJmYIQviG+PiRx+LNGtEI25w Yd1GqJe3Ai+gP+Y5WZd6P2M79XDr5Luo+OqcHgkVaZ8eagtSr8STdNu+Ho1/T3ID +ZHiaOQZntf7ntGnV7p7+TnEkKPE88zgRBrULv4NSvc32dflBqKDZ3YGjNlZP4KX jkSRKyBuqHiaiezq1JDhieFSx9vDSZQL/iyAzUrXw+039hCDSw/XR8xcdri9WNnK A9vDVZLNemJLe+HfnGKUnaEenTvCxgylcqb56GWhBe2eKa6aXtXWWmNDxrB2AQx7 objLPlBDi9sfUvtl3NYAR6HBcjToZ66rfpYvtVXt+W4Rctcr/gRMAEk6mQR5OqNf KvUUw9JGDQaKZn5pds2xyZYDYHYOpxk92dW2LYGpNfCoZTd8TeeFgRK/2IK3GQAj ZevQ3g49i1f7VkHc2wMH63fanm84k4XEx2vY35Z1qdO1FALSkbDBPXZxcIjfBhE+ 5Y9FZlE88JJaFNRJLfrEQGxyT1DK7ZfuiqoYYd07ypR+5r7OX3bmDEx0aL4s3+Ek vgmaw0jORGR6Di36T1NI/E54ecb6IF7na8FZrg9sJnntTz37lD6RMdKE4YJZ1Uwm pZVTdDYjtXHl5aj8Mh9bhO6RPZ6ozjACgcrTOYflNSTFHJ2no0OKogRc7V+CqltW RbE5cD4nGaxsqVqr7qYJ =Sa3K -----END PGP SIGNATURE----- --nextPart1556518.T4sfAZVjL3--