Gentoo Archives: gentoo-dev

From: Jonathan Callen <abcd@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Locale check in python_pkg_setup()
Date: Fri, 30 Jul 2010 00:13:36
Message-Id: 4C521920.6000206@gentoo.org
In Reply to: [gentoo-dev] Locale check in python_pkg_setup() by Arfrever Frehtes Taifersar Arahesis
-----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-----

Replies

Subject Author
Re: [gentoo-dev] Re: Locale check in python_pkg_setup() Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>