Репозитории ALT
S: | 2.028-alt5 |
5.1: | 2.027-alt4 |
4.1: | 2.027-alt2 |
4.0: | 2.027-alt1 |
3.0: | 2.027-alt0.3 |
Группа :: Разработка/Прочее
Пакет: cpan2rpm
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: cpan2rpm-2.028-untar.patch
Скачать
Скачать
diff --git a/cpan2rpm/cpan2rpm b/cpan2rpm/cpan2rpm
index 28e8b01..1933cab 100755
--- a/cpan2rpm/cpan2rpm
+++ b/cpan2rpm/cpan2rpm
@@ -1253,14 +1253,11 @@ sub untar($) {
system(@cmd) == 0 || die "system @cmd failed: $?";
system("chmod", "-R", "u+w", $dst);
- my $cmd = $zip
- ? "unzip -l $_ | grep -P -o '\\S+/\$' |tail -1"
- : "tar -t${z}vf $_ |head -1"
- ;
+ my $cmd = $zip ? "unzip -l $_" : "tar -t${z}vf $_";
+ $cmd .= " | grep -E '(Makefile|Build)\\.PL'";
chomp($_ = qx/$cmd/);
- $_ = (split)[5] unless $zip;
- $dst .= "/$1" if m|^(\S+)/?|;
+ $dst .= "/$1" if m!(\S+)/(?:Makefile|Build)\.PL$!;
$dst =~ s|/*$||; # path shouldn't end in / or tardir gets wiped
$dst =~ s|\./||; # paths in tarballs shouldn't be relative
return $dst;