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

guillem pushed a commit to branch sid
in repository dpkg.

commit d9146911e86c0913bef266aafdc4e59a8ec9a305
Author: Guillem Jover <guil...@debian.org>
Date:   Tue Oct 17 22:42:16 2017 +0200

    dpkg-buildpackage: Do not rehash .dsc file when signing binary-only builds
    
    Reported-by: Ximin Luo <infini...@debian.org>
    Stable-Candidate: 1.18.x
    (cherry picked from commit 7e48a3921244dcaa0c2bf9fadd53a52ab230212a)
---
 debian/changelog             | 2 ++
 scripts/dpkg-buildpackage.pl | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2d81348..30b5d26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ dpkg (1.19.0.2) UNRELEASED; urgency=medium
   * Fix logic in dpkg-buildpackage to decide whether to run build targets,
     which broke tons of packages that are violating Debian policy MUSTs.
     Thanks to James Clarke <jrt...@debian.org>. Closes: #878899
+  * Do not try to recompute hashes for the .dsc file when signing binary-only
+    builds in dpkg-buildpackage. Reported by Ximin Luo <infini...@debian.org>.
   * Packaging:
     - Add Breaks to libdpkg-perl against pkg-kde-tools (<< 0.15.28~), as
       that package is using private modules with no API guarantees, that
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index e7408c2..0705aca 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -657,11 +657,13 @@ if ($signsource or $signbuildinfo) {
     # Recompute the checksums as the .dsc and/or .buildinfo have changed.
     my $checksums = Dpkg::Checksums->new();
     $checksums->add_from_control($changes);
-    $checksums->add_from_file("../$pv.dsc", update => 1, key => "$pv.dsc");
+    $checksums->add_from_file("../$pv.dsc", update => 1, key => "$pv.dsc")
+        if $signsource;
     $checksums->add_from_file("../$pva.buildinfo", update => 1, key => 
"$pva.buildinfo");
     $checksums->export_to_control($changes);
     delete $changes->{'Checksums-Md5'};
-    update_files_field($changes, $checksums, "$pv.dsc");
+    update_files_field($changes, $checksums, "$pv.dsc")
+        if $signsource;
     update_files_field($changes, $checksums, "$pva.buildinfo");
     $changes->save($chg);
 }

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

Reply via email to