Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Trouble with CPAN::Site

by jellisii2 (Hermit)
on Jan 16, 2014 at 17:18 UTC ( [id://1070835]=perlquestion: print w/replies, xml ) Need Help??

jellisii2 has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed monks, thank you for your time

I am in the process of attempting to set up a local CPAN to distribute some internal-only modules to multiple clients. I'm using CPAN::Site to try and do it, but it doesn't seem to index my modules when I ask it to.

Per the documentation, I've set up a folder that's available on the network. That folder is readable by me.

/var/www/cpan

Also per the documentation, I've set up some subfolders to be indexed that emulates a PAUSE account:

/var/www/cpan/authors/F/FA/FAKEID

I'm running the indexer as suggested by the documentation:

cpansite --site /var/www/cpan index -vvv

And it indicates that it's fetched a bunch of stuff from CPAN as expected so it can forward requests from the clients to global modules. The thing is that it doesn't seem to be picking up my modules in the FAKEID folder as expected. Thoughts?

Verbose output from the index:
trace: cpansite version 1.11 trace: copy /var/www/cpan/global/01mailrc.txt.gz to /var/www/cpan/auth +ors/01mailrc.txt.gz trace: copy /var/www/cpan/global/03modlist.data.gz to /var/www/cpan/mo +dules/03modlist.data.gz trace: collecting all details from /var/www/cpan/modules/02packages.de +tails.txt.gz trace: extracting only existing local distributions trace: creating inventory from /var/www/cpan/authors/id trace: merge packages with CPAN core list in /var/www/cpan/global/02pa +ckages.details.txt.gz trace: collecting all details from /var/www/cpan/global/02packages.det +ails.txt.gz trace: creating package details in /var/www/cpan/modules/02packages.de +tails.tmp.gz info: produced list of 138969 packages lazy trace: backup old details file to /var/www/cpan/modules/02packages.det +ails.txt.gz.bak trace: copy /var/www/cpan/modules/02packages.details.txt.gz to /var/ww +w/cpan/modules/02packages.details.txt.gz.bak trace: promoting /var/www/cpan/modules/02packages.details.tmp.gz to cu +rrent trace: updating checksums
I'm checking /var/www/cpan/modules/02packages.details.tmp.gz for the existence of my module, but I'm not finding any evidence that it exists. I'm probably doing something wrong, but I can't determine what it is.

Replies are listed 'Best First'.
Re: Trouble with CPAN::Site
by jhourcle (Prior) on Jan 16, 2014 at 23:23 UTC

    At some point CPAN::Site or one of the other modules that it relies on started looking up author info in PAUSE. (I want to say it happened about 2 years ago, but my memory's foggy)

    As such, I don't think that you can use a fake ID -- you'll need to either register an ID in PAUSE and use that, or shove it into a directory named for some other legitimate account.

      The documentation doesn't suggest this, but I'll give it a swing. :-)

      --edit

      This did appear to fix the problem. What's the best way to suggest that the documentation get fixed?

      --edit1 So I've only half-fixed it: It's attempting to index my stuff, but it appears to fail:

      eellis@cpan:~$ cpansite --site /var/www/cpan --stand-alone --mode=DEB +UG --no-lazy index trace: cpansite version 1.11 trace: copy /var/www/cpan/global/01mailrc.txt.gz to /var/www/cpan/auth +ors/01mailrc.txt.gz trace: copy /var/www/cpan/global/03modlist.data.gz to /var/www/cpan/mo +dules/03modlist.data.gz trace: creating inventory from /var/www/cpan/authors/id trace: inspecting archive /var/www/cpan/authors/id/J/JE/JELLISII/MODUL +E.tar.gz trace: creating package details in /var/www/cpan/modules/02packages.de +tails.tmp.gz info: produced list of 0 packages full trace: backup old details file to /var/www/cpan/modules/02packages.det +ails.txt.gz.bak trace: copy /var/www/cpan/modules/02packages.details.txt.gz to /var/ww +w/cpan/modules/02packages.details.txt.gz.bak trace: promoting /var/www/cpan/modules/02packages.details.tmp.gz to cu +rrent trace: updating checksums trace: summing /var/www/cpan/authors/id/J/JE/JELLISII
      It says it's inspecting, but gives no indication that there's a problem until it says "Produced list of 0 packages full". I'm unclear as to what I need to do from here. I've been using ExtUtils::ModuleMaker to build out the basic framework of the module I'm packaging, and I do have a version number baked in.

      -- edit 2

      I'm a moron: was was archiving the wrong folder. Works great now.

Re: Trouble with CPAN::Site
by Bloodnok (Vicar) on Jan 17, 2014 at 12:20 UTC
    I've up-voted the OP because you (jellisii2) would appear to have mind-reading capability - you've managed to ask the very same question I was in the process of composing - thank you for that - awesome work :-)

    A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1070835]
Approved by ww
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found