The following commit has been merged in the master branch:
commit 64439508ccaf2c9a98fa11b7cce4df4d314cc334
Author: Raphael Hertzog <[email protected]>
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.

diff --git a/debian/changelog b/debian/changelog
index 06e2030..a23e82e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -55,6 +55,8 @@ dpkg (1.15.1) UNRELEASED; urgency=low
     available. Closes: #523329
   * dpkg-gencontrol now handles properly (empty) dependencies which contain
     only spaces. Closes: #522787
+  * dpkg-source now accepts additional tarballs (in format "3.0 (quilt)")
+    with a "component" name containing dashes. Closes: #524376
 
   [ Guillem Jover ]
   * Fix typo in dpkg output (‘unexecpted’ → ‘unexpected’). Closes: #519082
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index 60fffff..0cbf798 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -354,6 +354,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 23a2266..c109403 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -259,7 +259,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 97345ec..8d03ab7 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -97,7 +97,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;
@@ -250,7 +250,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($_);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to