perl-cpanplus-dist-arch icon indicating copy to clipboard operation
perl-cpanplus-dist-arch copied to clipboard

perl-module-install fails INSTALL_DIRS tests

Open xenoterracide opened this issue 15 years ago • 1 comments

http://aur.archlinux.org/packages.php?ID=10556

manual run

Module-Install-0.99 % PERL5LIB="lib" prove  t/22_installdirs.t 
t/22_installdirs.t .. 8/24 old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs
t/22_installdirs.t .. ok     
All tests successful.
Files=1, Tests=24,  2 wallclock secs ( 0.04 usr  0.00 sys +  1.30 cusr  0.29 csys =  1.63 CPU)
Result: PASS

packer run

t/22_installdirs.t ...................... 2/24 
#   Failed test 'correct INSTALLDIRS'
#   at t/22_installdirs.t line 33.

#   Failed test 'correct INSTALLDIRS'
#   at t/22_installdirs.t line 54.
old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs
t/22_installdirs.t ...................... 14/24 
#   Failed test 'correct INSTALLDIRS'
#   at t/22_installdirs.t line 76.

#   Failed test 'correct INSTALLDIRS'
#   at t/22_installdirs.t line 97.
# Looks like you failed 4 tests of 24.
t/22_installdirs.t ...................... Dubious, test returned 4 (wstat 1024, 0x400)

I'm thinking I should just disable testing for this module...

xenoterracide avatar Jun 10 '10 08:06 xenoterracide

This is because I switched to using environment variables to pass arguments to ExtUtils::MakeMaker / Module::Install / Module::Build.

What is happening, is the PKGBUILD is passing INSTALLDIRS=vendor to Module::Install via environment vars. The 22_installdirs.t test passes an explicit INSTALLDIRS to ~/local parameter inside a test. For some reason the environment variables take precedence over the parameters in the Makefile.PL.

I'll try reporting this upstream for either ExtUtils::MakeMaker or Module::Install (which is a wrapper around ExtUtils::MakeMaker) as a bug.

In the meantime, for a quick fix you can change the PKGBUILD.tt template back to not using the environment variables. I posted the PKGBUILD.tt as a gist: http://gist.github.com/433618

juster avatar Jun 10 '10 20:06 juster