Skip Menu |

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 32823
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: schwern [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: make arguments getting passed through to Build
Date: Wed, 30 Jan 2008 23:55:32 -0800
To: RT <bug-CPAN [...] rt.cpan.org>
From: Michael G Schwern <schwern [...] pobox.com>
Every once in a while I'll get a report like this: http://www.nntp.perl.org/group/perl.cpan.testers/951706 CPAN.pm is passing make arguments through to Build somehow. I've confirmed the user's configuration. Show quoted text
> /usr/lib/perl5/5.8.3/CPAN > grep j2 Config.pm > 'make_arg' => q[-j2], > 'make_install_arg' => q[-j2],
Test::Harness::Straps is one of the few pure Module::Build distributions out there which might explain why we don't see this very often. Everyone else is running the compatibility Makefile.PL. David Golden may have tracked down the issue, see below. Show quoted text
-------- Original Message -------- Subject: CPAN.pm bug? (was Re: FAIL Test-Harness-Straps-0.30...) Date: Tue, 22 Jan 2008 08:56:44 -0500 From: David Golden <xdaveg@gmail.com> To: Michael G Schwern <schwern@pobox.com>, Andreas J. Koenig <andreas.koenig.7os6VVqR@franz.ak.mind.de> I was curious enough to go look at CPAN.pm source and I think it may be a bug. In CPAN::Distribution::make, I saw this snippet of code: if ($self->{modulebuild}) { unless (-f "Build") { my $cwd = CPAN::anycwd(); $CPAN::Frontend->mywarn("Alert: no Build file available for 'make $self->{id}'". " in cwd[$cwd]. Danger, Will Robinson!\n"); $CPAN::Frontend->mysleep(5); } $system = join " ", $self->_build_command(), $CPAN::Config->{mbuild_arg}; } else { $system = join " ", $self->_make_command(), $CPAN::Config->{make_arg}; } $system =~ s/\s+$//; my $make_arg = $self->make_x_arg("make"); $system = sprintf("%s%s", $system, $make_arg ? " $make_arg" : "", ); That looks like the make_x_arg() call is adding extra options. Digging into it, I think it's connected to distroprefs, but it seems to fall back to this: my $what = sprintf "make%s_arg", $whixh eq "make" ? "" : $whixh; $make_x_arg ||= $CPAN::Config->{$what}; In make_x_arg -- the "whixh" argument is supposed to represent phase. So I think if no distropref exists, it always returns the "make_arg" config -- so if that is "-j3" then it gets tacked on even to a Build system command. To trigger it, I think someone would need to have "-j3" set *and* be using Module::Build as the preferred installer or for a distribution to only have a Build.PL -- which is what Test::Harness::Straps 0.30 has. I think that's why it's been rare to pop up. Andreas -- does that diagnosis make sense? I completely don't understand the distroprefs mechanism yet, so I'm hesistant to patch it. I don't know if 'make_x_arg' should only be used if make is the tool, or if make_x_arg should be modified to get either the make or mbuild config options as appropriate. Hope that helps, David On Jan 22, 2008 3:16 AM, Michael G Schwern <schwern@pobox.com> wrote:
> matisse@spamcop.net wrote:
> > Output from './Build -j3': > > > > No action '-j3' defined, try running the 'help' action.
> > You're about the nth person to report this but I never hear back. Could you > check your CPAN.pm configuration and see what the mbuild parameters are set to > and please report back? -j3 is not a Module::Build parameter. > > > -- > 54. "Napalm sticks to kids" is *not* a motivational phrase. > -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army > http://skippyslist.com/?page_id=3 >
-- But there's no sense crying over every mistake. You just keep on trying till you run out of cake. -- Jonathan Coulton, "Still Alive"
Thanks for the excellent analysis, guys. I just did a quick hackover to fix the identified bug and checked it into the repo. Renamed variables and methods with ugly names. Make test still passes. Not ready for a release yet, but I'll make one soonish. Thanks,