Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Gentoo Development <gentoo-dev@g.o>
From: Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>
Subject: Re: Locale check in python_pkg_setup()
Date: Fri, 30 Jul 2010 04:29:09 +0200
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 be used only in pkg_setup() phase"
> >  
> > +	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?

It's consistent with style used in python.eclass.

> > +	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
> > +		eerror
> > +		eerror "Currently used locale '${locale}' is unsupported and can cause 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 on how to fix locale."
> > +		eerror
> > +	fi
> > +
> >  	PYTHON_PKG_SETUP_EXECUTED="1"
> >  }
> >  

-- 
Arfrever Frehtes Taifersar Arahesis
Attachment:
signature.asc (This is a digitally signed message part.)
Replies:
Re: Locale check in python_pkg_setup()
-- Paweł Hajdan, Jr.
References:
Locale check in python_pkg_setup()
-- Arfrever Frehtes Taifersar Arahesis
Re: Locale check in python_pkg_setup()
-- Paweł Hajdan, Jr.
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Locale check in python_pkg_setup()
Next by thread:
Re: Locale check in python_pkg_setup()
Previous by date:
Re: Locale check in python_pkg_setup()
Next by date:
Re: Locale check in python_pkg_setup()


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.