Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56085 - g-cpan.pl fails on ParseDate / frogbak with message "Couldn't turn 'M/MU/MUIR/scripts/frogbak.tar.gz' into a directory name"
Summary: g-cpan.pl fails on ParseDate / frogbak with message "Couldn't turn 'M/MU/MUIR...
Status: RESOLVED CANTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Perl team
URL: http://chkno.net/~chkno/g-cpan-proble...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-04 12:49 UTC by chkno
Modified: 2005-03-14 09:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chkno 2004-07-04 12:49:33 UTC
g-cpan.pl fails on ParseDate / frogbak with the message "Couldn't turn 'M/MU/MUIR/scripts/frogbak.tar.gz' into a directory name"

I tried making g-cpan.pl 's portage_dir sub a little smarter.  It got farther, but still didn't install:

--- /usr/bin/g-cpan.pl.old      2004-07-04 11:27:26.777528976 -0700
+++ /usr/bin/g-cpan.pl  2004-07-04 11:30:16.756688216 -0700
@@ -145,8 +145,13 @@
        $file =~ tr/_/-/;

 # turn this into a directory name suitable for portage tree
-       return undef unless ( $file =~ m|.*/(.*)-[^-]+\.| );
-       return $1;
+       if ( $file =~ m|.*/(.*)-[^-]+\.| ) {
+               return $1;
+       } elsif ( $file =~ m|.*/([^.]*)\.| ) {
+               return $1;
+       } else {
+               return undef;
+       }
 }

 sub create_ebuild {



Reproducible: Always
Steps to Reproduce:
# g-cpan.pl ParseDate
Actual Results:  
# g-cpan.pl ParseDate 
mkdir /tmp/perl-modules_22011 
mkdir /tmp/perl-modules_22011/dev-perl 
CPAN: Storable loaded ok 
Going to read /root/.cpan/Metadata 
  Database was generated on Sat, 03 Jul 2004 22:05:10 GMT 
Couldn't turn 'M/MU/MUIR/scripts/frogbak.tar.gz' into a directory name 
# 

Expected Results:  
Build & install the ParseDate module. 

 (This is on an SMP system) 
 perl version 5.8.2-r1 
  
 # emerge info 
 Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 
2.6.7-gentoo-r6) 
 ================================================================= 
 System uname: 2.6.7-gentoo-r6 i686 AMD Athlon(tm) Processor 
 Gentoo Base System version 1.4.16 
 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled] 
 Autoconf: sys-devel/autoconf-2.59-r3 
 Automake: sys-devel/automake-1.8.3 
 ACCEPT_KEYWORDS="x86" 
 AUTOCLEAN="yes" 
 CFLAGS="-march=athlon-mp -O2 -fomit-frame-pointer -funroll-loops -pipe" 
 CHOST="i686-pc-linux-gnu" 
 COMPILER="gcc3" 
 CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control /var/www/localhost/htdocs/squirrelmail/config /var/www/localhost/htdocs/squirrelmail/data" 
 CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
 CXXFLAGS="-march=athlon-mp -O2 -fomit-frame-pointer -funroll-loops -pipe" 
 DISTDIR="/usr/portage/distfiles" 
 FEATURES="autoaddcvs ccache sandbox" 
 GENTOO_MIRRORS="http://gentoo.oregonstate.edu 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
 MAKEOPTS="-j3" 
 PKGDIR="/usr/portage/packages" 
 PORTAGE_TMPDIR="/var/tmp" 
 PORTDIR="/usr/portage" 
 PORTDIR_OVERLAY="" 
 SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" 
 USE="X alsa apache2 apm arts avi berkdb cdr cjk crypt cups dvd encode flac 
foomaticdb gdbm gif gnome gphoto2 gpm gtk gtk2 guile imlib java jpeg kde 
libg++ libwww linguas_en_GB mad mikmod mmx motif mozilla mpeg mysql ncurses 
nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl 
slang spell ssl tcltk tcpd tetex theora tiff truetype v4l vim-with-x x86 xml2 
xmms xv zlib"
Comment 1 Michael Cummings (RETIRED) gentoo-dev 2005-03-14 09:13:47 UTC
I won't deny g-cpan is having trouble here - but not sure there is anything that can be done for it since the downloaded file in no way matches the name of the module to install. That said - ParseDate is actually provided by dev-perl/Time-modules, so the fault here is more with cpan 02packages than with g-cpan (for this particular case).