Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-08-02 Thread Brian Harring
On Mon, Aug 02, 2010 at 11:18:59PM +0200, Arfrever Frehtes Taifersar Arahesis wrote: > A milder warning will be printed. Guessing you didn't get the part about "no warning should be put in" that everyone stated? You're ignoring that this message also will make users think that switching their

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-08-02 Thread Jeroen Roovers
On Mon, 2 Aug 2010 23:18:59 +0200 Arfrever Frehtes Taifersar Arahesis wrote: > + ewarn "exceptions. It is recommended to use a UTF-8 > locale to avoid problems." > + ewarn "See http://www.gentoo.org/doc/en/utf-8.xml > for information on how to change locale." In fact the

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-08-02 Thread Jeroen Roovers
On Mon, 2 Aug 2010 23:18:59 +0200 Arfrever Frehtes Taifersar Arahesis wrote: > A milder warning will be printed. I distinctly remember several voices being raised in this thread very recently, suggesting if not demanding that you should not convey a message like that at all, but fix the affected

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-08-02 Thread Mike Frysinger
the env lookup is still way more complicated than it needs to be: locale=${LC_ALL:-${LC_CTYPE:-${LANG}}} it is not possible for these variables to be set but not exported unless an ebuild is doing it, and those are broken anyways. the message should also reference an open bug report for

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-08-02 Thread Harald van Dijk
On Mon, Aug 02, 2010 at 11:02:20PM +0200, Arfrever Frehtes Taifersar Arahesis wrote: > It would have to be parsed using e.g. grep and sed. It's easier to call > Python in this case. It's even easier not to. > The call to Python is sufficiently fast: > > $ time python -c 'import os; print(os.en

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-08-02 Thread Arfrever Frehtes Taifersar Arahesis
A milder warning will be printed. -- Arfrever Frehtes Taifersar Arahesis --- python.eclass +++ python.eclass @@ -355,6 +355,8 @@ # Check if phase is pkg_setup(). [[ "${EBUILD_PHASE}" != "setup" ]] && die "${FUNCNAME}() can be used only in pkg_setup() phase" + local locale + if [[ "$#" -ne

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-08-02 Thread Arfrever Frehtes Taifersar Arahesis
2010-07-31 22:25:26 Petteri Räty napisał(a): > On 07/31/2010 11:10 PM, Arfrever Frehtes Taifersar Arahesis wrote: > >> > >> If the variable is set but not exported then it is local to the shell > >> env. When bash goes to exec() python the local shell variables are > >> not in the env; so os.envir

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread Mike Frysinger
On Saturday, July 31, 2010 18:14:50 James Cloos wrote: > Mike Frysinger writes: > > screwing with default locale when no locale variables are set is > > madness. > > I never said anything about changing C or POSIX. Only about creating > C.UTF-8 and/or POSIX.UTF-8. sorry, i misread. thought you

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread James Cloos
> "MF" == Mike Frysinger writes: MF> take it up with the POSIX group where they're already working on MF> defining a C.UTF-8/etc... locale. Then they agree with me. Good to know. Thanks. MF> screwing with default locale when no locale variables are set is madness. I never said anything

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread Mike Frysinger
On Saturday, July 31, 2010 17:39:27 James Cloos wrote: > Paweł Hajdan writes: > > Another thing we can consider is making UTF8 the default setup in > > Gentoo. I think most people (including me) don't care whether it's > > C or UTF8 as long as it works. > > Forcing utf-8 will only be reasonable wh

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread James Cloos
> "PH" == Paweł Hajdan, writes: PH> Another thing we can consider is making UTF8 the default setup in PH> Gentoo. I think most people (including me) don't care whether it's PH> C or UTF8 as long as it works. Forcing utf-8 will only be reasonable when there is a C.UTF-8 and/or a POSIX.UTF-8 l

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread Petteri Räty
On 07/31/2010 11:10 PM, Arfrever Frehtes Taifersar Arahesis wrote: >> >> If the variable is set but not exported then it is local to the shell >> env. When bash goes to exec() python the local shell variables are >> not in the env; so os.environ() will not contain them. >> >> anta...@kyoto ~ $ foo

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread Arfrever Frehtes Taifersar Arahesis
2010-07-31 21:49:50 Alec Warner napisał(a): > On Sat, Jul 31, 2010 at 7:44 AM, Arfrever Frehtes Taifersar Arahesis > wrote: > > 2010-07-30 04:36:22 Brian Harring napisał(a): > >> On Fri, Jul 30, 2010 at 01:16:42AM +0200, Arfrever Frehtes Taifersar > >> Arahesis wrote: > >> > --- python.eclass > >

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread Alec Warner
On Sat, Jul 31, 2010 at 7:44 AM, Arfrever Frehtes Taifersar Arahesis wrote: > 2010-07-30 04:36:22 Brian Harring napisał(a): >> On Fri, Jul 30, 2010 at 01:16:42AM +0200, Arfrever Frehtes Taifersar >> Arahesis wrote: >> > --- python.eclass >> > +++ python.eclass >> > @@ -355,6 +355,8 @@ >> >     #

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-31 Thread Arfrever Frehtes Taifersar Arahesis
2010-07-30 04:36:22 Brian Harring napisał(a): > On Fri, Jul 30, 2010 at 01:16:42AM +0200, Arfrever Frehtes Taifersar Arahesis > wrote: > > --- python.eclass > > +++ python.eclass > > @@ -355,6 +355,8 @@ > > # Check if phase is pkg_setup(). > > [[ "${EBUILD_PHASE}" != "setup" ]] && die "${F

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-30 Thread Mike Frysinger
On Thursday, July 29, 2010 19:16:42 Arfrever Frehtes Taifersar Arahesis wrote: > We received too many invalid bugs caused by unsupported locales. > python_pkg_setup() needs to check locale and print error (using eerror(), > without die()), when unsupported locale has been detected. there is no suc

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-30 Thread Brian Harring
On Fri, Jul 30, 2010 at 09:49:21AM -0700, "Paweee Hajdan, Jr." wrote: > On 7/29/10 8:48 PM, Brian Harring wrote: > > It's basically annoying people into changing to partially > > sidestep a couple of bugs, instead of fixing the issue- and that's the > > wrong course of action. > > I think that w

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-30 Thread Paweł Hajdan, Jr.
On 7/29/10 8:48 PM, Brian Harring wrote: > It's basically annoying people into changing to partially > sidestep a couple of bugs, instead of fixing the issue- and that's the > wrong course of action. I think that with python earlier than python-3 unicode handling is quite complicated, and I'm no

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-30 Thread Harald van Dijk
On Fri, Jul 30, 2010 at 01:16:18AM +0200, Arfrever Frehtes Taifersar Arahesis wrote: > We received too many invalid bugs caused by unsupported locales. > python_pkg_setup() needs to check > locale and print error (using eerror(), without die()), when unsupported > locale has been detected. I'm

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-29 Thread Brian Harring
On Fri, Jul 30, 2010 at 05:15:19AM +0200, Krzysztof Pawlik wrote: > On 07/30/10 01:16, Arfrever Frehtes Taifersar Arahesis wrote: > > + eerror "See http://www.gentoo.org/doc/en/utf-8.xml for > > information on how to fix locale." > > I'm with Brian on this one - my locale (C/POSIX) is no

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-29 Thread Krzysztof Pawlik
On 07/30/10 01:16, Arfrever Frehtes Taifersar Arahesis wrote: > We received too many invalid bugs caused by unsupported locales. > python_pkg_setup() needs to check > locale and print error (using eerror(), without die()), when unsupported > locale has been detected. ewarn then instead of eerror

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-29 Thread Paweł Hajdan, Jr.
On 7/29/10 7:29 PM, Arfrever Frehtes Taifersar Arahesis wrote: > 2010-07-30 01:20:19 Paweł Hajdan, Jr. napisał(a): >> nit: Why not declare "local locale" here, close to its usage? > It's consistent with style used in python.eclass. Fine for me then. Thanks for explaining. Paweł signature.asc D

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-29 Thread Brian Harring
On Fri, Jul 30, 2010 at 01:16:42AM +0200, Arfrever Frehtes Taifersar Arahesis wrote: > --- python.eclass > +++ python.eclass > @@ -355,6 +355,8 @@ > # Check if phase is pkg_setup(). > [[ "${EBUILD_PHASE}" != "setup" ]] && die "${FUNCNAME}() can be used > only in pkg_setup() phase" >

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-29 Thread Arfrever Frehtes Taifersar Arahesis
2010-07-30 01:20:19 Paweł Hajdan, Jr. napisał(a): > On 7/29/10 4:16 PM, Arfrever Frehtes Taifersar Arahesis wrote: > > > > --- python.eclass > > +++ python.eclass > > @@ -355,6 +355,8 @@ > > # Check if phase is pkg_setup(). > > [[ "${EBUILD_PHASE}" != "setup" ]] && die "${FUNCNAME}() can b

Re: [gentoo-dev] Locale check in python_pkg_setup()

2010-07-29 Thread Paweł Hajdan, Jr.
On 7/29/10 4:16 PM, Arfrever Frehtes Taifersar Arahesis wrote: > > --- python.eclass > +++ python.eclass > @@ -355,6 +355,8 @@ > # Check if phase is pkg_setup(). > [[ "${EBUILD_PHASE}" != "setup" ]] && die "${FUNCNAME}() can be used > only in pkg_setup() phase" > > + local local

[gentoo-dev] Locale check in python_pkg_setup()

2010-07-29 Thread Arfrever Frehtes Taifersar Arahesis
We received too many invalid bugs caused by unsupported locales. python_pkg_setup() needs to check locale and print error (using eerror(), without die()), when unsupported locale has been detected. -- Arfrever Frehtes Taifersar Arahesis --- python.eclass +++ python.eclass @@ -355,6 +355,8 @@