On Fri, Jun 26, 2009 at 9:44 PM, Andreas J.
Koenig<andreas.koenig.7os6v...@franz.ak.mind.de> wrote:
>>>>>> On Fri, 26 Jun 2009 10:41:50 -0400, Asif Iqbal <vad...@gmail.com> said:
>
>  > On Wed, Jun 24, 2009 at 10:50 PM, Andreas J.
>  > Koenig<andreas.koenig.7os6v...@franz.ak.mind.de> wrote:
>  >> What is in /var/spool/cpan/ ? If it is looks like being left over by
>  >> CPAN.pm please send it to me. As a workaround I suggest removing "it"
>  >> if possible.
>
>  > # ls -al /var/spool/cpan/
>  > total 11652
>  > drwxr-xr-x 7 root root     4096 2009-06-26 10:40 .
>  > drwxr-xr-x 5 root root     4096 2009-06-23 17:56 ..
>  > drwxr-xr-x 5 root root     4096 2009-06-24 14:53 
> CPAN-DistnameInfo-0.08-EIEXh8
>  > -rw-r--r-- 1 root root     1257 2009-06-24 14:53
>  > CPAN-DistnameInfo-0.08-EIEXh8.yml
>  > -rw-r--r-- 1 root root     3718 2009-06-26 10:40 FTPstats.yml
>
> Thank you, this is it. It's not expected to have unrelated yaml files
> in the build directory. You can try to get away with the patch below
> or isolate the build directory from other directories within ~/.cpan/.
> I would expect that not having a dedicated build directory has more
> inherent risks, so better you run
>
>  o conf init build_dir

excellent! that worked

# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.94)
ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?)

cpan[1]> o conf init build_dir


The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide or a personal directory.

 <build_dir>
Directory where the build process takes place? [/var/spool/cpan] /var/run/cpan



Please remember to call 'o conf commit' to make the config permanent!


cpan[2]> o conf commit
commit: wrote '/etc/perl/CPAN/Config.pm'

cpan[3]> exit
Terminal does not support GetHistory.
Lockfile removed.

# cpan IO::Socket::SSL
CPAN: Storable loaded ok (v2.18)
Going to read '/var/spool/cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.015)
CPAN: YAML loaded ok (v0.68)
............................................................................DONE
CPAN: LWP::UserAgent loaded ok (v5.819)
CPAN: Time::HiRes loaded ok (v1.9719)
Fetching with LWP:
  http://www.perl.org/CPAN/modules/02packages.details.txt.gz
Going to read '/var/spool/cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Fri, 26 Jun 2009 22:27:03 GMT
............................................................................DONE
Fetching with LWP:
  http://www.perl.org/CPAN/modules/03modlist.data.gz
Going to read '/var/spool/cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Going to write /var/spool/cpan/Metadata
IO::Socket::SSL is up to date (1.24).

#

>
> and choose a new, empty build directory instead of the old one.
>
> Something like this patch will eventually be applied to the sources to
> prevent future accidents like yours.
>
> --- a/lib/CPAN/Index.pm
> +++ b/lib/CPAN/Index.pm
> @@ -146,7 +146,7 @@ sub reanimate_build_dir {
>             next DISTRO;
>         }
>         my $c = $y->[0];
> -        if ($c && CPAN->_perl_fingerprint($c->{perl})) {
> +        if ($c && $c->{perl} && CPAN->_perl_fingerprint($c->{perl})) {
>             my $key = $c->{distribution}{ID};
>             for my $k (keys %{$c->{distribution}}) {
>                 if ($c->{distribution}{$k}
>
>
> Thanks for the report,
> --
> andreas
>



-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Reply via email to