summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-12-23 00:25:38 +0100
committerGuillem Jover <guillem@debian.org>2017-01-27 04:53:40 +0100
commit0701185eae3629224a7f74a2ff1b8e1d08630180 (patch)
tree019b648304497cf65a9ca407eb92b320fcf2112f /scripts
parent5bddd2d7b9944ab2eacb1860ba625b69b0b4411c (diff)
downloaddpkg-0701185eae3629224a7f74a2ff1b8e1d08630180.tar.gz
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dpkg-genchanges.pl6
-rw-r--r--scripts/t/dpkg_buildpackage/test-source_0_source.changes3
2 files changed, 9 insertions, 0 deletions
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 7eb62837e..f9b2e847c 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 bb93b521c..95ea1be6a 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