[dpkg] 137/200: dpkg-genchanges: Include .buildinfo files also for source-only uploads

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:17:29 UTC 2017


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

infinity0 pushed a commit to branch master
in repository dpkg.

commit 0701185eae3629224a7f74a2ff1b8e1d08630180
Author: Guillem Jover <guillem at debian.org>
Date:   Fri Dec 23 00:25:38 2016 +0100

    dpkg-genchanges: Include .buildinfo files also for source-only uploads
    
    The .buildinfo file also makes sense on source-only uploads, because it is
    still a build. And more so when we have done a full build, but filtered the
    changes to only include the sources in the upload.
    
    In any case, this was the intended behavior from the beginning.
    
    Closes: #846164
---
 debian/changelog                                         | 2 ++
 scripts/dpkg-genchanges.pl                               | 6 ++++++
 scripts/t/dpkg_buildpackage/test-source_0_source.changes | 3 +++
 3 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ba9fae5..2cdf455 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ dpkg (1.18.19) UNRELEASED; urgency=medium
     architectures for artifacts we are not going to distribute, and do not
     unnecessarily recompute the checksums for artifacts like the sources.
   * Do not compute the architecture list twice in dpkg-genchanges.
+  * Include .buildinfo files also for source-only uploads in dpkg-genchanges.
+    Closes: #846164
   * Portability:
     - On GNU/Hurd try to use the new process executable name attribute from
       libps, to properly match on start-stop-daemon --exec.
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 7eb6283..f9b2e84 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -313,6 +313,12 @@ error(g_('binary build with no binary artifacts found; cannot distribute'))
 foreach my $file ($dist->get_files()) {
     my $f = $file->{filename};
 
+    if (defined $file->{package} && $file->{package_type} eq 'buildinfo') {
+        # We always distribute the .buildinfo file.
+        $checksums->add_from_file("$uploadfilesdir/$f", key => $f);
+        next;
+    }
+
     # If this is a source-only upload, ignore any other artifacts.
     next if build_has_none(BUILD_BINARY);
 
diff --git a/scripts/t/dpkg_buildpackage/test-source_0_source.changes b/scripts/t/dpkg_buildpackage/test-source_0_source.changes
index bb93b52..95ea1be 100644
--- a/scripts/t/dpkg_buildpackage/test-source_0_source.changes
+++ b/scripts/t/dpkg_buildpackage/test-source_0_source.changes
@@ -19,9 +19,12 @@ Changes:
 Checksums-Sha1:
  0000000000000000000000000000000000000000 0 test-source_0.dsc
  0000000000000000000000000000000000000000 0 test-source_0.tar.xz
+ 0000000000000000000000000000000000000000 0 test-source_0_source.buildinfo
 Checksums-Sha256:
  0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0.dsc
  0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0.tar.xz
+ 0000000000000000000000000000000000000000000000000000000000000000 0 test-source_0_source.buildinfo
 Files:
  00000000000000000000000000000000 0 test optional test-source_0.dsc
  00000000000000000000000000000000 0 test optional test-source_0.tar.xz
+ 00000000000000000000000000000000 0 test optional test-source_0_source.buildinfo

-- 
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