Rt-3.6.0pre0 "make fixdeps" fails with CPAN errors?

Hello!

Starting with a fresh RHEL3 WS box, built and installed Perl 5.8.6 and
mod_perl 2.0.2, did the usual CPAN config-ery including an “install
Bundle::CPAN” which got me to CPAN v1.87, then tried “make fixdeps” for
the first time and got a pile of errors:

% make fixdeps
[…]
MASON dependencies:
Params::Validate 0.02…MISSING
Install module Params::Validate
Number found where operator expected
at /usr/lib/perl5/5.8.6/CPAN/FirstTime.pm line 456, near "<= 60 && -s _

0"
(Missing operator before 0?)
syntax error at /usr/lib/perl5/5.8.6/CPAN/FirstTime.pm line 456, near
“<= 60 && -s _ > 0”
Global symbol “$mby” requires explicit package name
at /usr/lib/perl5/5.8.6/CPAN/FirstTime.pm line 468.
Global symbol “$overwrite_local” requires explicit package name
at /usr/lib/perl5/5.8.6/CPAN/FirstTime.pm line 469.
Global symbol “$mby” requires explicit package name
at /usr/lib/perl5/5.8.6/CPAN/FirstTime.pm line 470.

In more bizarre news, while trying to eliminate the problem, I dropped
back to CPAN 1.86, 1.85, then 1.76, during which I got issues like this:

[…]
Exception::Class 1.14…MISSING
Install module Exception::Class
Running install for module Exception::Class
Running make for D/DR/DROLSKY/Exception-Class-1.23.tar.gz
LWP not available
Fetching with Net::FTP:
ftp://archive.progeny.com/CPAN/authors/id/D/DR/DROLSKY/Exception-
Class-1.23.tar.gz
WARNING: This key is not certified with a trusted signature!
Primary key fingerprint: 2E66 557A B97C 19C7 91AF 8E20 328D A867 450F
89EC
Signature for /rel/top_tp/rt-redhat-
i686-3/src/cpan/sources/authors/id/D/DR/DROLSKY/CHECKSUMS ok
LWP not available
Fetching with Net::FTP:
ftp://archive.progeny.com/CPAN/authors/id/D/DR/DROLSKY/CHECKSUMS
WARNING: This key is not certified with a trusted signature!
Primary key fingerprint: 2E66 557A B97C 19C7 91AF 8E20 328D A867 450F
89EC
Signature for /rel/top_tp/rt-redhat-
i686-3/src/cpan/sources/authors/id/D/DR/DROLSKY/CHECKSUMS ok
Checksum for /rel/top_tp/rt-redhat-
i686-3/src/cpan/sources/authors/id/D/DR/DROLSKY/Exception-
Class-1.23.tar.gz ok
Can’t unlink file tmp: No such file or directory
at /usr/lib/perl5/5.8.6/CPAN.pm line 4373

==> Couldn’t mkdir ‘/rel/top_tp/rt-redhat-i686-3/src/cpan/build/tmp’:
File exists

==> Cannot continue: Please find the reason why I cannot make the <==
==> directory <==
==> /rel/top_tp/rt-redhat-i686-3/src/cpan/build/tmp <==
==> and fix the problem, then retry. <==

I discovered that if I just run “cpan” at this point and do “install
Exception::Class”, it all works just fine (for CPAN 1.76 and 1.87).
Bizarre.

If it’s useful, I can fairly quickly revert to the fresh install plus
perl 5.8.6 (and even add the mod_perl stuff, too) to track this down.

Any thoughts?

Cheers!

–j
Jim Meyer, Geek at Large purp@acm.org

Hello!

The short story:

make fixdeps doesn’t play nice on RHEL3 WS using perl 5.8.6 due to
something odd about how calling cpan Foo::Bar differs from
CPAN::Shell->install('Foo::Bar'). You can setenv RT_FIX_DEPS_CMD cpan to work around this issue.

The saga:

So after Jesse pointed out that I’d not configured cpan by running it
once, I went back to duplicate this again, without the spurious errors
from CPAN.

So again, fresh RHEL3 WS box, Perl 5.8.6, mod_perl 2.0.2 installed. I
did make sure cpan was configured this time; I didn’t update
Bundle::CPAN, so it’s v1.76 which comes with Perl 5.8.6. I still see the
build/tmp error, which doesn’t seem to happen if I work directly in a
cpan shell:

make fixdeps

/usr/bin/perl ./sbin/rt-test-dependencies --verbose --install --with-
Oracle
perl:
5.8.3…found
users:
rt group (user)…found
bin owner (root)…found
libs owner (root)…found
libs group (bin)…found
web owner (apache)…found
web group (apache)…found
MASON dependencies:
Params::Validate 0.02…found
Cache::Cache …MISSING
Install module Cache::Cache
CPAN: Storable loaded ok
Going to read /rel/top_tp/rt-redhat-i686-3/src/cpan/Metadata
Database was generated on Thu, 02 Mar 2006 10:16:42 GMT
Running install for module Cache::Cache
Running make for D/DC/DCLINTON/Cache-Cache-1.04.tar.gz
LWP not available
CPAN: Net::FTP loaded ok
Fetching with Net::FTP:
ftp://archive.progeny.com/CPAN/authors/id/D/DC/DCLINTON/Cache-
Cache-1.04.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for /rel/top_tp/rt-redhat-
i686-3/src/cpan/sources/authors/id/D/DC/DCLINTON/Cache-Cache-1.04.tar.gz
ok
Scanning cache /rel/top_tp/rt-redhat-i686-3/src/cpan/build for sizes
Warning: weird direntry in /rel/top_tp/rt-redhat-i686-3/src/cpan/build:
tmp
Can’t unlink file tmp: No such file or directory
at /usr/lib/perl5/5.8.6/CPAN.pm line 3908
Couldn’t mkdir tmp: File exists at /usr/lib/perl5/5.8.6/CPAN.pm line
5496
make: *** [fixdeps] Error 17

I immediately ran cpan and typed install Cache::Cache and it worked
fine. When I tried make fixdeps again, the next module succeeded, but
the one after failed due to the tmp directory’s insistence on existing.

For grins, I read the rt-test-dependencies code and discovered I could
use RT_FIX_DEPS_CMD to control how fixdeps fixes deps. When I set that
to ‘cpan’, everything went swimmingly.

So it seems that CPAN::Shell->install(‘foo’) differs from cpan foo
who knew?

FYI’ly yours,

–j
Jim Meyer, Geek at Large purp@acm.org