The following commit has been merged in the master branch:
commit ff03345b7a8d9dd0950dc581c5263373b2a0b406
Author: Raphaël Hertzog <[email protected]>
Date: Fri Apr 9 09:36:22 2010 +0200
dpkg-source: do not allow underscore in component name for supplementary
tarballs
According the documentation they were never meant to be allowed
but usage of perl's \w allowed them nevertheless. [\w-] has now been
replaced by [[:alnum:]-] everywhere so that the code fits the
documentation.
diff --git a/debian/changelog b/debian/changelog
index f699fea..43a1451 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,9 @@ dpkg (1.15.6.2) UNRELEASED; urgency=low
* Fix dpkg to not lose package metadata on filesystems where readdir()
returns new files added after the opendir() call, btrfs in particular
triggered the problematic behaviour. Closes: #575891
+ * Tigthen the regex used by dpkg-source to match the component name of
+ supplementary tarballs so that undercore (_) are not allowed as it was
+ supposed to be.
[ Updated dpkg translations ]
* German (Sven Joachim).
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index a47af98..6c9cba2 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -233,7 +233,7 @@ sub find_original_tarballs {
($opts{include_main} and
/^\Q$basename\E\.orig\.tar\.$opts{extension}$/) or
($opts{include_supplementary} and
- /^\Q$basename\E\.orig-[\w-]+\.tar\.$opts{extension}$/)
+ /^\Q$basename\E\.orig-[[:alnum:]-]+\.tar\.$opts{extension}$/)
} readdir(DIR);
closedir(DIR);
}
@@ -317,7 +317,7 @@ sub extract {
my ($dirname, $destdir) = fileparse($newdirectory);
$destdir ||= "./";
my $ext = $compression_re_file_ext;
- foreach my $orig (grep { /^\Q$basename\E\.orig(-\w+)?\.tar\.$ext$/ }
+ foreach my $orig (grep {
/^\Q$basename\E\.orig(-[[:alnum:]-]+)?\.tar\.$ext$/ }
$self->get_files())
{
my $src = File::Spec->catfile($self->{'basedir'}, $orig);
diff --git a/scripts/Dpkg/Source/Package/V2.pm
b/scripts/Dpkg/Source/Package/V2.pm
index ab9b33a..1fc1e0a 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -104,7 +104,7 @@ sub do_extract {
$seen{$uncompressed} = 1;
if ($file =~ /^\Q$basename\E\.orig\.tar\.$re_ext$/) {
$tarfile = $file;
- } elsif ($file =~ /^\Q$basename\E\.orig-([\w-]+)\.tar\.$re_ext$/) {
+ } elsif ($file =~
/^\Q$basename\E\.orig-([[:alnum:]-]+)\.tar\.$re_ext$/) {
$origtar{$1} = $file;
} elsif ($file =~ /^\Q$basenamerev\E\.debian\.tar\.$re_ext$/) {
$debianfile = $file;
@@ -276,7 +276,7 @@ sub do_build {
$tarfile = $_;
push @origtarballs, $_;
$self->add_file($_);
- } elsif (/\.orig-([\w-]+)\.tar\.$compression_re_file_ext$/) {
+ } elsif (/\.orig-([[:alnum:]-]+)\.tar\.$compression_re_file_ext$/) {
$origtar{$1} = $_;
push @origtarballs, $_;
$self->add_file($_);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]