[Reproducible-commits] [dpkg] 02/08: dpkg-source: accept dashes in component name of additional tarballs

Holger Levsen holger at layer-acht.org
Tue May 3 08:43:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag 1.14.27
in repository dpkg.

commit 1ccfc5ae75c97aae609423d58bcfd5392a07b344
Author: Raphael Hertzog <hertzog at debian.org>
Date:   Fri Apr 17 22:24:19 2009 +0200

    dpkg-source: accept dashes in component name of additional tarballs
    
    The regular expression used to identify additional tarballs (used in
    formats "2.0" and "3.0 (quilt)") was too strict and refused dashes. This
    commit fixes that and documents the set of allowed characters in the
    dpkg-source manual page.
---
 debian/changelog                  | 4 +++-
 man/dpkg-source.1                 | 1 +
 scripts/Dpkg/Source/Package.pm    | 2 +-
 scripts/Dpkg/Source/Package/V2.pm | 4 ++--
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9afee17..215c4af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 dpkg (1.14.27) UNRELEASED; urgency=low
 
-  *
+  * Cherry-pick some fixes from squeeze concerning new source formats:
+    - dpkg-source now accepts additional tarballs (in format "3.0 (quilt)")
+      with a "component" name containing dashes. Closes: #524376
 
  -- Raphael Hertzog <hertzog at debian.org>  Thu, 09 Apr 2009 20:32:31 +0200
 
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index 98758ae..2b5bf7d 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -344,6 +344,7 @@ an original tarball (\fB.orig.tar.\fP\fIext\fP where \fIext\fP can be
 \fBgz\fP, \fBbz2\fP and \fBlzma\fP) and a debian tarball
 (\fB.debian.tar.\fP\fIext\fP). It can also contain additional original
 tarballs (\fB.orig-\fP\fIcomponent\fP\fB.tar.\fP\fIext\fP).
+\fIcomponent\fP can only contain alphanumeric characters and dashes ("-").
 .PP
 .B Extracting
 .PP
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index c9441b9..54f108a 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -253,7 +253,7 @@ sub find_original_tarballs {
         next unless defined($dir) and -d $dir;
         opendir(DIR, $dir) || syserr(_g("cannot opendir %s"), $dir);
         push @tar, map { "$dir/$_" }
-                  grep { /^\Q$basename\E\.orig(-\w+)?\.tar\.$ext$/ }
+                  grep { /^\Q$basename\E\.orig(-[\w-]+)?\.tar\.$ext$/ }
                   readdir(DIR);
         closedir(DIR);
     }
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 3c1b2cb..87ee729 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -96,7 +96,7 @@ sub do_extract {
         $seen{$uncompressed} = 1;
         if ($file =~ /^\Q$basename\E\.orig\.tar\.$comp_regex$/) {
             $tarfile = $file;
-        } elsif ($file =~ /^\Q$basename\E\.orig-(\w+)\.tar\.$comp_regex$/) {
+        } elsif ($file =~ /^\Q$basename\E\.orig-([\w-]+)\.tar\.$comp_regex$/) {
             $origtar{$1} = $file;
         } elsif ($file =~ /^\Q$basenamerev\E\.debian\.tar\.$comp_regex$/) {
             $debianfile = $file;
@@ -246,7 +246,7 @@ sub do_build {
             $tarfile = $_;
             push @origtarballs, $_;
             $self->add_file($_);
-        } elsif (/\.orig-(\w+)\.tar\.$comp_regex$/) {
+        } elsif (/\.orig-([\w-]+)\.tar\.$comp_regex$/) {
             $origtar{$1} = $_;
             push @origtarballs, $_;
             $self->add_file($_);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list