CC: | 'Andreas J. König' <andreas.koenig.7os6vvqr [...] franz.ak.mind.de> |
Subject: | Broken build_requires_install_policy |
Date: | Tue, 12 Oct 2010 16:23:35 +1000 |
To: | "'CPAN RT'" <bug-CPAN [...] rt.cpan.org> |
From: | "Xavier Bergade" <xavierb [...] benon.com> |
Note: This is a follow up to my previous email, with a better/simpler
example of the problem.
Summary: Given 2 modules M and N, build_requires_install_policy doesnt
correctly promote modules required by N if N is on M's build_requires list.
Distribution name and version: perl v5.12.X, happens with both CPAN v1.9456
*AND* v1.9461
Operating system: CentOS v5.5 but should be irrelevant
Related RT reports:
https://rt.cpan.org/Public/Bug/Display.html?id=57482
https://rt.cpan.org/Public/Bug/Display.html?id=57788
Steps to reproduce:
1/ Install a fresh perl in /opt/perl-5.12.2
export PERL_VERSION=5.12.2
wget http://www.cpan.org/src/perl-$PERL_VERSION.tar.bz2
tar xfj perl-$PERL_VERSION.tar.bz2 && cd perl-$PERL_VERSION
sh Configure -des -Dusethreads -Duselargefiles
-Dprefix=/opt/perl-$PERL_VERSION
make install && cd $PERL_VERSION && bin/perl -v
2/ Install Mouse + Test::Exception, then try running Test::Exception
(echo 'o conf build_requires_install_policy no' && echo 'install Mouse
Test::Exception') | bin/cpan &>> /tmp/cpan-Mouse.log
tail /tmp/cpan-Mouse.log # note that Sub::Uplevel was not installed
because it " only build_requires" even though Test::Exception has it in its
requires list.
bin/perl -e 'use Test::Exception' # fails because Sub::Uplevel wasn't
installed
That was with v5.12.2's default CPAN v1.9456, so because of your comments in
RT 57482 & 57788 I also tried v1.9461 but the problem is still present.
Also, I see the following in your Changes file:
"bugfix: RT #57482 and #57788 revealed that configure_requires implicitly
assumed build_requires instead of normal requires."
http://cpansearch.perl.org/src/ANDK/CPAN-1.94_61/Changes
That looks correct to me... shouldn't "configure_requires" be on the same as
"test_requires" and "build_requires"?
That is, for any given module, if "build_requires_install_policy" is set to
"no" I would assume that none of the modules in any of the *_requires lists
would be installed, don't you agree?