[dpkg] 138/200: dpkg-genchanges: Fix check for expected number of binary artifacts
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 c9b4ec6a1d80feea2f5c97bfaf435be75ca84cde
Author: Guillem Jover <guillem at debian.org>
Date: Fri Dec 23 00:34:46 2016 +0100
dpkg-genchanges: Fix check for expected number of binary artifacts
Only count the binaries that we are going to include in the upload,
instead of guessing using implicit counts.
---
debian/changelog | 2 ++
scripts/dpkg-genchanges.pl | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 2cdf455..1a3a512 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,8 @@ dpkg (1.18.19) UNRELEASED; urgency=medium
* Do not compute the architecture list twice in dpkg-genchanges.
* Include .buildinfo files also for source-only uploads in dpkg-genchanges.
Closes: #846164
+ * Fix check for expected number of binary artifacts in dpkg-genchanges, to
+ only take into account the artifacts that we are distributing.
* 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 f9b2e84..73213ee 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -303,12 +303,9 @@ if (build_has_any(BUILD_SOURCE)) {
$origsrcmsg = g_('binary-only upload (no source code included)');
}
-my $dist_count = 0;
+my $dist_binaries = 0;
-$dist_count = $dist->load($fileslistfile) if -e $fileslistfile;
-
-error(g_('binary build with no binary artifacts found; cannot distribute'))
- if build_has_any(BUILD_BINARY) && $dist_count == 0;
+$dist->load($fileslistfile) if -e $fileslistfile;
foreach my $file ($dist->get_files()) {
my $f = $file->{filename};
@@ -336,8 +333,12 @@ foreach my $file ($dist->get_files()) {
}
$checksums->add_from_file("$uploadfilesdir/$f", key => $f);
+ $dist_binaries++;
}
+error(g_('binary build with no binary artifacts found; cannot distribute'))
+ if build_has_any(BUILD_BINARY) && $dist_binaries == 0;
+
# Scan control info of all binary packages
foreach my $pkg ($control->get_packages()) {
my $p = $pkg->{'Package'};
--
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