1 |
2010-07-30 01:20:19 Paweł Hajdan, Jr. napisał(a): |
2 |
> On 7/29/10 4:16 PM, Arfrever Frehtes Taifersar Arahesis wrote: |
3 |
> > |
4 |
> > --- python.eclass |
5 |
> > +++ python.eclass |
6 |
> > @@ -355,6 +355,8 @@ |
7 |
> > # Check if phase is pkg_setup(). |
8 |
> > [[ "${EBUILD_PHASE}" != "setup" ]] && die "${FUNCNAME}() can be used only in pkg_setup() phase" |
9 |
> > |
10 |
> > + local locale |
11 |
> > + |
12 |
> > if [[ "$#" -ne 0 ]]; then |
13 |
> > die "${FUNCNAME}() does not accept arguments" |
14 |
> > fi |
15 |
> > @@ -407,6 +409,16 @@ |
16 |
> > unset -f python_pkg_setup_check_USE_flags |
17 |
> > fi |
18 |
> |
19 |
> nit: Why not declare "local locale" here, close to its usage? |
20 |
|
21 |
It's consistent with style used in python.eclass. |
22 |
|
23 |
> > + locale="$(python -c 'import os; print(os.environ.get("LC_ALL", os.environ.get("LC_CTYPE", os.environ.get("LANG", "POSIX"))))')" |
24 |
> > + if [[ "${locale}" != *.UTF-8 ]]; then |
25 |
> > + eerror |
26 |
> > + eerror "Currently used locale '${locale}' is unsupported and can cause build-time or run-time" |
27 |
> > + eerror "problems (usually UnicodeDecodeErrors or UnicodeEncodeErrors). Bugs caused by this locale" |
28 |
> > + eerror "will be closed as invalid. It is recommended to use a UTF-8 locale to avoid problems." |
29 |
> > + eerror "See http://www.gentoo.org/doc/en/utf-8.xml for information on how to fix locale." |
30 |
> > + eerror |
31 |
> > + fi |
32 |
> > + |
33 |
> > PYTHON_PKG_SETUP_EXECUTED="1" |
34 |
> > } |
35 |
> > |
36 |
|
37 |
-- |
38 |
Arfrever Frehtes Taifersar Arahesis |