[dpkg] 161/187: dpkg-genbuildinfo: For binary builds expect at least one binary artifact

Reiner Herrmann reiner at reiner-h.de
Sun Nov 6 12:46:40 UTC 2016


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

deki-guest pushed a commit to branch master
in repository dpkg.

commit ebe99eaf776faed23639bffb8e020c81b4d455de
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Nov 3 23:35:33 2016 +0100

    dpkg-genbuildinfo: For binary builds expect at least one binary artifact
    
    If we are doing a binary build, we should expect at least one binary
    artifact, and fail otherwise, instead of just always emitting a
    warning due to missing binary artifacts.
    
    Reported-by: Sven Joachim <svenjoac at gmx.de>
---
 scripts/dpkg-genbuildinfo.pl | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/scripts/dpkg-genbuildinfo.pl b/scripts/dpkg-genbuildinfo.pl
index 18c0326..b183aa5 100755
--- a/scripts/dpkg-genbuildinfo.pl
+++ b/scripts/dpkg-genbuildinfo.pl
@@ -370,16 +370,18 @@ my $dist_count = 0;
 
 $dist_count = $dist->load($fileslistfile) if -e $fileslistfile;
 
-warning(g_('binary build with no binary artifacts found; .buildinfo will be meaningless'))
-    if $dist_count == 0;
+if (build_has_any(BUILD_BINARY)) {
+    error(g_('binary build with no binary artifacts found; .buildinfo is meaningless'))
+        if $dist_count == 0;
 
-foreach my $file ($dist->get_files()) {
-    my $path = "$uploadfilesdir/$file->{filename}";
-    $checksums->add_from_file($path, key => $file->{filename});
+    foreach my $file ($dist->get_files()) {
+        my $path = "$uploadfilesdir/$file->{filename}";
+        $checksums->add_from_file($path, key => $file->{filename});
 
-    if (defined $file->{package_type} and $file->{package_type} =~ m/^u?deb$/) {
-        push @archvalues, $file->{arch}
-            if defined $file->{arch} and not $archadded{$file->{arch}}++;
+        if (defined $file->{package_type} and $file->{package_type} =~ m/^u?deb$/) {
+            push @archvalues, $file->{arch}
+                if defined $file->{arch} and not $archadded{$file->{arch}}++;
+        }
     }
 }
 

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