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

guillem pushed a commit to branch master
in repository dpkg.

commit e226e6cf5507eebd4888d3d11e1b65752af6752f
Author: Guillem Jover <guil...@debian.org>
Date:   Sat Feb 3 03:24:00 2018 +0100

    Dpkg::Source::Package: Print building lines for upstream tarball signatures
    
    When we are picking up upstream tarball signatures, we should also print
    them as being used to create the source package.
    
    Closes: #888787
---
 debian/changelog                  |  2 ++
 scripts/Dpkg/Source/Package/V1.pm |  5 ++++-
 scripts/Dpkg/Source/Package/V2.pm | 18 ++++++++++++------
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 252efd9..541b0c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -52,6 +52,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
     - Mark hurd-i386 as having gcc builtin PIE in Dpkg::Vendor::Debian.
       Requested by Samuel Thibault <sthiba...@debian.org>.
     - Dpkg::Source::Package::V2: Print one building line per existing tarball.
+    - Dpkg::Source::Package: Print building lines for upstream tarball
+      signatures. Closes: #888787
   * Documentation:
     - Update gettext minimal version in README.
     - Add a missing dot on the dpkg-buildflags(1) «lfs» feature paragraph.
diff --git a/scripts/Dpkg/Source/Package/V1.pm 
b/scripts/Dpkg/Source/Package/V1.pm
index 001d9ec..38c2498 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -413,7 +413,10 @@ sub do_build {
     if ($tarname and -e "$tarname.sig" and not -e "$tarname.asc") {
         openpgp_sig_to_asc("$tarname.sig", "$tarname.asc");
     }
-    $self->add_file($tarsign) if $tarsign and -e $tarsign;
+    if ($tarsign and -e $tarsign) {
+        info(g_('building %s using existing %s'), $sourcepackage, $tarsign);
+        $self->add_file($tarsign);
+    }
 
     if ($sourcestyle =~ m/[kpKP]/) {
         if (stat($origdir)) {
diff --git a/scripts/Dpkg/Source/Package/V2.pm 
b/scripts/Dpkg/Source/Package/V2.pm
index 5fdd249..13e5d74 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -399,7 +399,7 @@ sub _generate_patch {
     # Identify original tarballs
     my ($tarfile, %addonfile);
     my $comp_ext_regex = compression_get_file_extension_regex();
-    my @origtarballs;
+    my @origtarfiles;
     foreach my $file (sort $self->find_original_tarballs()) {
         if ($file =~ /\.orig\.tar\.$comp_ext_regex$/) {
             if (defined($tarfile)) {
@@ -407,20 +407,26 @@ sub _generate_patch {
                          'one is allowed'), $tarfile, $file);
             }
             $tarfile = $file;
-            push @origtarballs, $file;
+            push @origtarfiles, $file;
             $self->add_file($file);
             if (-e "$file.sig" and not -e "$file.asc") {
                 openpgp_sig_to_asc("$file.sig", "$file.asc");
             }
-            $self->add_file("$file.asc") if -e "$file.asc";
+            if (-e "$file.asc") {
+                push @origtarfiles, "$file.asc";
+                $self->add_file("$file.asc")
+            }
         } elsif ($file =~ /\.orig-([[:alnum:]-]+)\.tar\.$comp_ext_regex$/) {
             $addonfile{$1} = $file;
-            push @origtarballs, $file;
+            push @origtarfiles, $file;
             $self->add_file($file);
             if (-e "$file.sig" and not -e "$file.asc") {
                 openpgp_sig_to_asc("$file.sig", "$file.asc");
             }
-            $self->add_file("$file.asc") if -e "$file.asc";
+            if (-e "$file.asc") {
+                push @origtarfiles, "$file.asc";
+                $self->add_file("$file.asc");
+            }
         }
     }
 
@@ -428,7 +434,7 @@ sub _generate_patch {
           $self->_upstream_tarball_template()) unless $tarfile;
 
     if ($opts{usage} eq 'build') {
-        foreach my $origtarfile (@origtarballs) {
+        foreach my $origtarfile (@origtarfiles) {
             info(g_('building %s using existing %s'),
                  $self->{fields}{'Source'}, $origtarfile);
         }

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

Reply via email to