in reply to Re^3: using CPAN through web
in thread using CPAN through web

It is writable

# ls -l /home/rohan/.cpan/
total 5452
drwxr-xr-x  3 apache apache    4096 Mar 30 04:19 build
-rw-r--r--  1 apache apache 5560000 Mar 30 03:43 Metadata
drwxr-xr-x  4 apache apache    4096 Mar 30 03:41 sources

Whats more, the directory too gets created!

# ls -l /home/rohan/.cpan/build/tmp/MP3-Tag-0.94/
total 116
-r--r--r--  1 apache apache  1212 May 29  2004 cddb.tm
-r--r--r--  1 apache apache  1151 Feb 10  2004 cddb.tmp
-r--r--r--  1 apache apache 14789 Sep 17  2004 Changes

-r--r--r--  1 apache apache  4277 Mar 12  2004 data_pod.PL
drwxrwxrwx  3 apache apache  4096 Sep 17  2004 examples
-r--r--r--  1 apache apache   768 May 29  2004 Makefile.PL
-r--r--r--  1 apache apache   616 Sep 16  2004 MANIFEST
-r--r--r--  1 apache apache   290 Sep 17  2004 META.yml
-r--r--r--  1 apache apache  1495 Jan 22  2004 README.txt
drwxrwxrwx  2 apache apache  4096 Sep 17  2004 t
drwxrwxrwx  2 apache apache  4096 Sep 17  2004 Tag
-r--r--r--  1 apache apache 43470 Sep 17  2004 Tag.pm
-r--r--r--  1 apache apache   704 Jun  7  2001 test.mp3
drwxrwxrwx  2 apache apache  4096 Sep 17  2004 tk-tag
-r--r--r--  1 apache apache  1099 Nov 15  2000 TODO

So it seems the module IS getting untarred, but I don't know whats happening after that. :-(

Replies are listed 'Best First'.
Re^5: using CPAN through web
by tlm (Prior) on Mar 29, 2005 at 23:17 UTC

    The relevant section of CPAN.pm (at least in 5.8.4):

    $system = "$CPAN::Config->{tar} xvf $file"; $CPAN::Frontend->myprint(qq{Using Tar:$system:\n}); if (system($system)==0) { $CPAN::Frontend->myprint(qq{Untarred $file successfully\n} +); } else { $CPAN::Frontend->mydie(qq{Couldn\'t untar $file\n}); }
    That system call is failing for some reason. I'd check to make sure that (a) the same tar command does not fail on the command line (try something like
    /bin/tar xvf /home/ro...es/MP3-Tag-0.94.tar && echo ok || echo failed
    ), and (b) that there is no difference in content between the stuff untarred by your CPAN CGI script and the stuff untarred from the command line (use the directory form of diff). That may give you some clues for why the system call is failing. You could write a simple CGI script that just untars something via a similar system call, and check for its return value, and thereby begin to narrow down the problem (i.e. CPAN.pm vs. tar), but I admit that I'm grasping at straws here.

    the lowliest monk