Bug#782068: perl: t/run/locale fails when LC_* are set

Niko Tyni ntyni at debian.org
Fri Apr 10 08:00:19 UTC 2015


severity 759733 normal
merge 782068 759733
tag 782068 patch
thanks

On Wed, Apr 08, 2015 at 12:36:39PM +0200, gregor herrmann wrote:
> On Wed, 08 Apr 2015 10:02:53 +0100, Dominic Hargreaves wrote:
> 
> > > > When trying to build perl using pbuilder, the test `t/run/locale`
> > > > failed. I had LC_TIME and LC_CTYPE set.
> > > Reminds me of a bug I reported last summer ...
> > > Here it is: #759733

That one never mentioned pbuilder; can you recall if that was how you
ran into it? Anyway, it's clearly the same issue so merging.

> > This one feels more like a bug in pbuilder to me. Shouldn't it
> > clean the environment of LC_* if it is not going to provide the
> > needed locales, rather than putting the onus on the package being built?

FWIW sbuild (or rather schroot underneath) resets the environment
by default, including LC_*.

It looks like pbuilder just sets LC_ALL=C, which overrides all the other
settings. Now, if the shell invoking pbuilder has another LC_* setting,
that is preserved in the chroot environment even if the locale isn't
provided there.  LC_ALL just masks it, and when LC_ALL is unset by the
test in the perl package, the problem surfaces.

> While this is a valid point, I assume that also a plain
> dpkg-buildpackage in a "normal" environment fails, which is not
> elegant.

That would only happen when LC_<something> is set to a locale which
doesn't exist on the system, right? Such an environment doesn't seem
"normal" to me.

If we declare that builds need to generally work with invalid values
in environment variables, I expect there's plenty of fun to be had
with CC, MAKE, SHELL, et al.

All that said, given the interaction with pbuilder, I think we should
fix the perl package one way or another to survive this. Something like
the attached patch might do, ideally upstream of course.
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0041-Make-t-run-locale.t-survive-missing-locales-masked-b.patch
Type: text/x-diff
Size: 1863 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20150410/00743773/attachment.patch>


More information about the Perl-maintainers mailing list