diff options
author | Guillem Jover <guillem@debian.org> | 2016-12-23 00:34:46 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2017-01-27 04:53:40 +0100 |
commit | c9b4ec6a1d80feea2f5c97bfaf435be75ca84cde (patch) | |
tree | eb09c380474e8bbce5894ef392bd2b78145346bc /scripts | |
parent | 0701185eae3629224a7f74a2ff1b8e1d08630180 (diff) | |
download | dpkg-c9b4ec6a1d80feea2f5c97bfaf435be75ca84cde.tar.gz |
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.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dpkg-genchanges.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index f9b2e847c..73213ee4e 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'}; |