Ugly CPAN hack

brian_d_foy on 2004-09-05T06:54:56

I'm trying to track down a problem with a module installation. The module passes all of its tests when I try it by hand, but some tests failed when I install it from CPAN.

Rather than upload a series of versions to CPAN and waiting to test them, I can just shove them into my local minicpan.

It's not as simple as replacing the file since its CHECKSUM has to be right too

CPAN: Storable loaded ok
Going to read /usr/local/src/cpan/Metadata
  Database was generated on Fri, 03 Sep 2004 03:08:05 GMT
Running install for module Local::Foo
Running make for B/BD/BDFOY/Local-Foo-1.05.tar.gz
CPAN: LWP::UserAgent loaded ok
CPAN: URI::URL loaded ok
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok

Checksum mismatch for distribution file. Please investigate.

Distribution id = B/BD/BDFOY/Local-Foo-1.05.tar.gz CPAN_USERID BDFOY (brian d foy ) CALLED_FOR Local::Foo CONTAINSMODS Local::Foo MD5_STATUS incommandcolor 1 localfile /MINICPAN/authors/id/B/BD/BDFOY/Local-Foo-1.05.tar.gz

I'd recommend removing /MINICPAN/authors/id/B/BD/BDFOY/Local-Foo-1.05.tar.gz. Its MD5 checksum is incorrect. Maybe you have configured your 'urllist' with a bad URL. Please check this array with 'o conf urllist', and retry.


The appropriate file is CHECKSUMS in my minicpan author directory

/MINICPAN/authors/id/B/BD/BDFOY/CHECKSUMS


When I replace the tarball, I just have to update the module's hash in CHECKSUMS.

  'Local-Foo-1.01.tar.gz' => {
    'mtime' => '2004-09-03',
    'md5' => 'e71d9664000dd26223c9ef02b5706b4a',
    'size' => 15499
  },


If I only update the "md5" key, I still get the same error because I have to update the size too, although the error doesn't mention the size.

At the moment I'm just doing that manually. The CHECKSUMS file is open in BBEdit's text window (boy does BBEdit 8 suck even less!). If I have to do this more than a couple of times (or I still have to do it), I'll automate it (because CPAN::Checksums makes it so easy).


Uglier CPAN Hack

schwern on 2004-09-05T15:59:19

Try CPAN::Site.

How about...

samtregar on 2004-09-05T20:39:59

...just deleting CHECKSUMS. I seem to remember that CPAN.pm will just warn and continue if it doesn't exist.

-sam

Re:How about...

brian_d_foy on 2004-09-05T20:44:14

That might work, but I already shoved CPAN::Checksums into the script to mv the file. It's easy-peasy, so I might as well use it. :)