Skip Menu |

This queue is for tickets about the cpan2rpm CPAN distribution.

Report information
The Basics
Id: 13487
Status: resolved
Priority: 0/
Queue: cpan2rpm

People
Owner: Nobody in particular
Requestors: adamm [...] wazamatta.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.028
Fixed in: (no value)



Subject: Fix for tarballs with no subdirs for .pm files
Without this patch, packages like Image::Xbm and Image::Xpm cannot be installed. Here's what I see: -- module: Image::Xbm -- Using cached URL: http://search.cpan.org//CPAN/authors/id/S/SU/SUMMER/Image-Xbm-1.08.tar.gz Tarball found - not fetching Metadata retrieval Tarball extraction: [/usr/src/redhat/SOURCES/Image-Xbm-1.08.tar.gz] get_meta(): Not a directory at /usr/bin/cpan2rpm line 396. -- Done -- line 396 is: chdir $info->{evaldir} || die "get_meta(): $!"; and $info->{evaldir} contained the string /tmp/ykd6B8II7D/Image-Xbm-1.08/MANIFEST With the patch, these modules can install properly. Doesn't seem to break any other functionality.
diff -ru cpan2rpm-2.028/cpan2rpm cpan2rpm-new/cpan2rpm --- cpan2rpm-2.028/cpan2rpm 2005-06-17 22:06:54.000000000 -0700 +++ cpan2rpm-new/cpan2rpm 2005-06-30 09:35:49.000000000 -0700 @@ -26,6 +26,7 @@ use strict; use warnings; +use File::Basename; use Getopt::Long; use Sys::Hostname; use Pod::Text; @@ -387,6 +388,9 @@ $info->{buildarch} = "noarch" if $xs == 0; } + if (not -d $info->{evaldir}) { + $info->{evaldir} = dirname($info->{evaldir}); + } chdir $info->{evaldir} || die "get_meta(): $!"; $_ = "$info->{evaldir}/Build.PL";
Adam, thanks for the patch. I'm not sure I understand the context under which this happens but the patch seems otherwise harmless and will be included in the next release... in the meantime you can always get the unreleased, bleeding-edge version from the home page. thanks again. - ekkis