Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567148 - dev-python/reportlab-3.1.44-r2 reports erroneous missing UTF-8 locale
Summary: dev-python/reportlab-3.1.44-r2 reports erroneous missing UTF-8 locale
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-30 09:55 UTC by John (EBo) David
Modified: 2015-11-30 21:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
required emerge --info (emerge.info,7.55 KB, text/plain)
2015-11-30 09:55 UTC, John (EBo) David
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John (EBo) David 2015-11-30 09:55:46 UTC
Created attachment 418184 [details]
required emerge --info

Updating dev-python/reportlab-3.1.44-r2 reported: 

 * Could not find a UTF-8 locale. This may trigger build failures in
 * some python packages. Please ensure that a UTF-8 locale is listed in
 * /etc/locale.gen and run locale-gen.

so I checked /etc/locale.gen, and "en_US.UTF-8 UTF-8" was set, so I reran locale-gen and then re-emerged dev-python/reportlab-3.1.44-r2.  This resulted in the same message being reported.

Expected result, install without warning.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2015-11-30 11:51:16 UTC
What is your locale set too?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-30 12:32:20 UTC
(In reply to Justin Lecher from comment #1)
> What is your locale set too?

That's in emerge info. It's POSIX. I'll recheck the locale check when I get home.
Comment 3 Gil Kloepfer 2015-11-30 21:19:50 UTC
The problem looks like it's in the _python_check_locale_sanity in eclass python-utils-r1.

Unless I'm misunderstanding what this is supposed to do (check to see that upper/lower case translations work properly for the locale being checked), the string assigned to variable input is unquoted, while the comparison for the variable output later on is quoted.

The "input" string has blank spaces between each character, so the translated version (the "output" string) has the same spaces as well.

The quoted "${uc[*]}${lc[*]}" (because it is quoted) does not have the blank spaces between each character, and thus the test fails.

If the line in _python_check_locale_sanity():
local input=${lc[*]}${uc[*]}

is changed to:
local input="${lc[*]}${uc[*]}"

there will not be a problem any longer.

If someone would like me to provide a patch, I will be happy to do so (but I think it will probably be easier for someone to just change it than to patch).
Comment 4 Mike Gilbert gentoo-dev 2015-11-30 21:57:29 UTC
commit 283da8a1e1ad0a820b1170307a1ba3ec9bbdeb66
Author: Michał Górny <mgorny@gentoo.org>
Date:   Mon Nov 30 14:27:29 2015 +0100

    python-utils-r1.eclass: _python_check_locale_sanity, fix quoting issue