Subject: | Detection of toplevel of tar fails for som tar-balls |
When trying to build some distributions, ex. NEXT-0.60.tar.gz or Digest-SHA-5.03.tar.gz, the untar routine fails to detect the toplevel dir of the tar-ball, causing get_meta to report "No PL file in tarball".
This happens when the first entry of the tar ball (the toplevel directory) doesn't have a trailing /, which normal tars has:
# tar ztvf /usr/src/packages/SOURCES/Digest-SHA-5.03.tar.gz | head -1
drwxr-xr-x mshelor/staff 0 2004-07-31 09:15:27 Digest-SHA-5.03
# tar ztvf /usr/src/packages/SOURCES/CPAN-1.76.tar.gz | head -1
drwxr-xr-x k/k 0 2003-07-31 17:05:44 CPAN-1.76/
A simple hack to fix this would be to remove the condition, but I'm affraid that will break something else (distirbutions with no directory entry?)!
--- /usr/bin/cpan2rpm.org 2004-08-02 17:53:25.000000000 +0200
+++ /usr/bin/cpan2rpm 2004-08-02 18:02:44.000000000 +0200
@@ -1251,7 +1251,7 @@
my $d = qx/tar -t${z}f $_ |head -1/;
chomp($d);
- $dst .= "/$d" if $d =~ s|/.*$||;
+ $dst .= "/$d";
return $dst;
}