Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394091 - dev-lang/perl-5.12.4-r1: emerge with stdout redirected fails due to COLUMNS=-1
Summary: dev-lang/perl-5.12.4-r1: emerge with stdout redirected fails due to COLUMNS=-1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-09 01:19 UTC by SpanKY
Modified: 2012-05-17 04:31 UTC (History)
3 users (show)

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


Attachments
emerge --info perl (emerge-info.log,20.59 KB, text/plain)
2011-12-09 01:21 UTC, SpanKY
Details
perl build log (perl-build.log,9.08 KB, text/plain)
2011-12-09 01:23 UTC, SpanKY
Details
Unset columns on src_configure (perl.patch,4.49 KB, text/plain)
2012-01-01 16:58 UTC, Jorge Manuel B. S. Vicetto (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2011-12-09 01:19:54 UTC
if i run:
# emerge perl |& tee ~/log

it fails on me.  it seems to be related to this new warning:
ls: ignoring invalid width in environment variable COLUMNS: -1

except coreutils has always worked this way (i checked back to version 7.4, and we're currently at 8.14).  so maybe something else has changed to trigger this (bash? portage?).

at any rate, adding `unset COLUMNS` to the top of src_configure in the perl ebuild seems to fix things for me ...
Comment 1 SpanKY gentoo-dev 2011-12-09 01:21:44 UTC
Created attachment 295239 [details]
emerge --info perl
Comment 2 SpanKY gentoo-dev 2011-12-09 01:23:03 UTC
Created attachment 295241 [details]
perl build log
Comment 3 Torsten Veller (RETIRED) gentoo-dev 2011-12-10 12:21:32 UTC
(In reply to comment #0)
> if i run:
> # emerge perl |& tee ~/log
> 
> it fails on me.  it seems to be related to this new warning:
> ls: ignoring invalid width in environment variable COLUMNS: -1
> 
> except coreutils has always worked this way (i checked back to version 7.4, and
> we're currently at 8.14).

Sorry, i lack the background: What's referenced by "this way"?

>  so maybe something else has changed to trigger this
> (bash? portage?).

I think COLUMNS gets exported by 
mysettings["COLUMNS"] = columns
in the following commit in doebuild.py:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=7c5e61b3f44

> at any rate, adding `unset COLUMNS` to the top of src_configure in the perl
> ebuild seems to fix things for me ...
Comment 4 SpanKY gentoo-dev 2011-12-10 18:56:59 UTC
the perl configure script is such crap.  looks like it fails because it tests stderr output to see if a file exists.
    for filelist in x??; do
        (cd "$rsrc"; ls `cat "$tmppwd/$filelist"` \
            >/dev/null 2>>"$tmppwd/missing")
    done

although we use `ls` in a few places in the tree which would also trigger this warning.  most places shouldn't be using `ls` anyways due to the behavior being changeable based on the user's env.

zac: maybe get_term_size() should return 0,0 rather than -1,-1 ?
Comment 5 Zac Medico gentoo-dev 2011-12-10 19:15:15 UTC
(In reply to comment #4)
> zac: maybe get_term_size() should return 0,0 rather than -1,-1 ?

Okay, fixed now:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93c60fc277e37109a4ead36f69a6a50b7f72b229
Comment 6 Zac Medico gentoo-dev 2011-12-11 09:02:02 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > zac: maybe get_term_size() should return 0,0 rather than -1,-1 ?
> 
> Okay, fixed now:
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93c60fc277e37109a4ead36f69a6a50b7f72b229

This is fixed in 2.1.10.40 and 2.2.0_alpha80.
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-12-20 06:50:34 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > zac: maybe get_term_size() should return 0,0 rather than -1,-1 ?
> > 
> > Okay, fixed now:
> > 
> > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93c60fc277e37109a4ead36f69a6a50b7f72b229
> 
> This is fixed in 2.1.10.40 and 2.2.0_alpha80.

Zac,

this regression in Portage is now breaking stages. Can you please apply this fix to portage-2.1.10.41 or do a new release so we can get it marked stable?
Comment 8 Zac Medico gentoo-dev 2011-12-20 06:54:58 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > (In reply to comment #4)
> > > > zac: maybe get_term_size() should return 0,0 rather than -1,-1 ?
> > > 
> > > Okay, fixed now:
> > > 
> > > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93c60fc277e37109a4ead36f69a6a50b7f72b229
> > 
> > This is fixed in 2.1.10.40 and 2.2.0_alpha80.
> 
> Zac,
> 
> this regression in Portage is now breaking stages. Can you please apply this
> fix to portage-2.1.10.41 or do a new release so we can get it marked stable?

It's already in 2.1.10.41. You can see the get_term_size commit in the log:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=shortlog;h=refs/tags/v2.1.10.41
Comment 9 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-12-20 07:18:47 UTC
@perl:

The stages are failing to build because of this issue. Can we get a "fixed" version marked stable, please?
Comment 10 Zac Medico gentoo-dev 2011-12-20 07:32:32 UTC
Apparently complains about COLUMNS=0 too, so there's a portage patch in git to set it to 80 in that case:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93c60fc277e37109a4ead36f69a6a50b7f72b229

Meanwhile, I'd suggest to export COLUMNS=0 if you need a workaround for this bug.
Comment 11 Zac Medico gentoo-dev 2011-12-20 07:34:17 UTC
(In reply to comment #10)
> Apparently complains about COLUMNS=0 too, so there's a portage patch in git to
> set it to 80 in that case:
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93c60fc277e37109a4ead36f69a6a50b7f72b229

I meant this commit:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f5f54b524b22e85c14539a9bb2ce52c7a4e312b
Comment 12 Zac Medico gentoo-dev 2011-12-23 19:05:18 UTC
(In reply to comment #11)
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f5f54b524b22e85c14539a9bb2ce52c7a4e312b

This is included in sys-apps/portage-2.1.10.42 and 2.2.0_alpha82, so the COLUMNS=80 workaround should not be necessary starting with these versions.
Comment 13 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-12-31 15:39:14 UTC
(In reply to comment #10)
> Apparently complains about COLUMNS=0 too, so there's a portage patch in git to
> set it to 80 in that case:
> 
> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93c60fc277e37109a4ead36f69a6a50b7f72b229
> 
> Meanwhile, I'd suggest to export COLUMNS=0 if you need a workaround for this
> bug.

@perl,

this is still breaking stages.

(In reply to comment #12)
> (In reply to comment #11)
> > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f5f54b524b22e85c14539a9bb2ce52c7a4e312b
> 
> This is included in sys-apps/portage-2.1.10.42 and 2.2.0_alpha82, so the
> COLUMNS=80 workaround should not be necessary starting with these versions.

Zac,

Would it be ok to get portage-2.1.10.42 marked stable? This is an issue with perl, not portage, but it would allow us to build stages again.
Comment 14 Zac Medico gentoo-dev 2011-12-31 20:00:02 UTC
(In reply to comment #13)
> Would it be ok to get portage-2.1.10.42 marked stable? This is an issue with
> perl, not portage, but it would allow us to build stages again.

I'm planning to do that in about 3 weeks.
Comment 15 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2012-01-01 16:58:13 UTC
Created attachment 297547 [details]
Unset columns on src_configure

@perl:

unless you object or fix the underlying test, I'll update perl-5.12.4-r1 with this patch so we can get stages building again until the new portage version is marked stable.
Comment 16 Torsten Veller (RETIRED) gentoo-dev 2012-01-02 16:32:06 UTC
I don't think it is correct to "unset COLUMNS" in the perl ebuilds just because stable portage exports a non-valid COLUMNS value.

But if you do not agree, feel free to add it.
Comment 17 Zac Medico gentoo-dev 2012-01-02 22:42:10 UTC
As a compromise you could do something like this:

[[ ${COLUMNS:-1} -lt 1 ]] && unset COLUMNS
Comment 18 Zac Medico gentoo-dev 2012-01-02 22:56:52 UTC
I've patched all of the ebuilds like this:

diff -u -b -B -r1.7 perl-5.12.4-r1.ebuild
--- perl-5.12.4-r1.ebuild       7 Nov 2011 17:45:03 -0000       1.7
+++ perl-5.12.4-r1.ebuild       2 Jan 2012 22:50:01 -0000
@@ -151,6 +151,7 @@
        declare -a myconf
 
        export LC_ALL="C"
+       [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
 
        # some arches and -O do not mix :)
        use ppc && replace-flags -O? -O1
Comment 19 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2012-05-06 23:12:17 UTC
Anything left to do here?
Comment 20 SpanKY gentoo-dev 2012-05-17 04:31:42 UTC
i don't think so