Просмотр исходного кода

dpkg-source: fail if several orig.tar files are available

This concerns formats 2.0 and 3.0 (quilt) where the upstream tarball can
be available with different compression schemes. We need precisely one
file otherwise it doesn't know which one should be used and might pick the
wrong one.
Raphaël Hertzog лет назад: 16
Родитель
Сommit
7f64bc6544
2 измененных файлов с 7 добавлено и 0 удалено
  1. 3 0
      debian/changelog
  2. 4 0
      scripts/Dpkg/Source/Package/V2.pm

+ 3 - 0
debian/changelog

@@ -5,6 +5,9 @@ dpkg (1.15.5.3) UNRELEASED; urgency=low
     instead to directly get a pipe file descriptor. Closes: #557013
   * Put "3.0 (quilt)" in the default list of formats tried by dpkg-source
     after "1.0" and before "3.0 (native)".
+  * Let dpkg-source fail if several upstream orig.tar files are available
+    (using different compression scheme) since we don't know which one
+    to use.
 
   [ Guillem Jover ]
   * Verify that the alternative used in update-alternatives --set has been

+ 4 - 0
scripts/Dpkg/Source/Package/V2.pm

@@ -248,6 +248,10 @@ sub do_build {
     my @origtarballs;
     foreach (sort $self->find_original_tarballs()) {
         if (/\.orig\.tar\.$comp_regex$/) {
+            if (defined($tarfile)) {
+                error(_g("several orig.tar files found (%s and %s) but only " .
+                         "one is allowed"), $tarfile, $_);
+            }
             $tarfile = $_;
             push @origtarballs, $_;
             $self->add_file($_);