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 1OedEG-0003rE-Ne for garchives@archives.gentoo.org; Fri, 30 Jul 2010 00:13:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 72D9DE09EE; Fri, 30 Jul 2010 00:13:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EC5D2E09C9 for ; Fri, 30 Jul 2010 00:13:23 +0000 (UTC) Received: from [192.168.1.4] (pool-173-71-209-28.clppva.fios.verizon.net [173.71.209.28]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPSA id 582721B408D for ; Fri, 30 Jul 2010 00:13:23 +0000 (UTC) Message-ID: <4C521920.6000206@gentoo.org> Date: Thu, 29 Jul 2010 20:13:20 -0400 From: Jonathan Callen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100724 Thunderbird/3.1.1 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: [gentoo-dev] Re: Locale check in python_pkg_setup() References: <201007300116.43653.Arfrever@gentoo.org> In-Reply-To: <201007300116.43653.Arfrever@gentoo.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 7511da98-a076-4bca-b09e-47f496e3ea00 X-Archives-Hash: 343e63eee53ec9daa5601b9bf871fb6c -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 07/29/2010 07:16 PM, Arfrever Frehtes Taifersar Arahesis wrote: > + locale="$(python -c 'import os; print(os.environ.get("LC_ALL", os.environ.get("LC_CTYPE", os.environ.get("LANG", "POSIX"))))')" > + if [[ "${locale}" != *.UTF-8 ]]; then Shouldn't you be checking the output of `locale charmap` instead of the actual contents of the LC_ALL/LC_CTYPE/LANG variables? You currently are reporting an error if someone is using the "en_US.utf8" locale (which *is* a legal UTF-8 locale, and should not be an error). - -- Jonathan Callen -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCAAGBQJMUhkgAAoJELHSF2kinlg4dwYQAKkGNSIQJR+2If0c97MSTWZz hj5UAUrj+hYsxdg4rjOt/J6rGdh/iG+v1OwzaGZy0GZpb3O/KKajrfbYDaarGXMp RwHviKOh+jVZqnaCKF63Iz4F80BaEJpvuQBfU0zrwRVlvl5nVS9HaOuwXslFKFJr ge4ygrsRkKWqenaVZbjvWnYWeFWxMHF3iGH77uWrAci04cDArJjNX6puCKiwCMEt F/+aXro7DqkyZws084L1xjovfWs9HcbdkGPMsQ5TR48MqRIDRDuxKiNoRhRQoDjM qSUKR8FpZtTcrXyIsPrZw85f2XAAsXXdW6aMwVcpj9rS7JxNeM8/383Z5A+i/za2 iyynZcBhZj1jYOWtghCvfOeKHdO+s6iBPRg/yN7WAashiS6cCa+hBwXeHT1YDw1V iXSKfSKQnPcT1sqXqtZ7IkLKvXxG0PTNIrpIJya7SXCKTlZP97E6uVZcJeYYOT3Y sN0FqCxJ7F7SIRndfC4Q9fxU6wxcNICoB6VF1jkpyYccO7XyjFqL9zNfd9+2Pe6u hqAVZpae7GbE5NJJnkWvb7fQj0PVdhlk54dUdr9p5cinKnfV2hPW+23lSInpkgdw Oa1ZMUy1G9+lEUsCN2ve/l3gfuUAWXeZx/Nuo6ieuJ/HJLFkAn9Cbbpy9C+VlkxN K2S4CEu16mDy9zgrrbq+ =w5tr -----END PGP SIGNATURE-----