summaryrefslogtreecommitdiff
path: root/scripts/dpkg-genbuildinfo.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dpkg-genbuildinfo.pl')
-rwxr-xr-xscripts/dpkg-genbuildinfo.pl19
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/dpkg-genbuildinfo.pl b/scripts/dpkg-genbuildinfo.pl
index 45c45089d..5b2cfe6f7 100755
--- a/scripts/dpkg-genbuildinfo.pl
+++ b/scripts/dpkg-genbuildinfo.pl
@@ -69,6 +69,7 @@ my $buildinfo_format = '1.0';
my $buildinfo;
my $checksums = Dpkg::Checksums->new();
+my %distbinaries;
my %archadded;
my @archvalues;
@@ -232,8 +233,7 @@ sub collect_installed_builddeps {
# virtual package: we cannot know for sure which implementation
# is the one that has been used, so let's add them all...
foreach my $provided (@{$facts->{virtualpkg}->{$pkg_name}}) {
- my ($provided_by, $provided_rel, $provided_ver) = @{$provided};
- push @unprocessed_pkgs, $provided_by;
+ push @unprocessed_pkgs, $provided->{provider};
}
}
# else: it is a package in an OR dependency that has been otherwise
@@ -386,6 +386,15 @@ if (build_has_any(BUILD_BINARY)) {
# Make us a bit idempotent.
next if $file->{filename} =~ m/\.buildinfo$/;
+ if (defined $file->{arch}) {
+ my $arch_all = debarch_eq('all', $file->{arch});
+
+ next if build_has_none(BUILD_ARCH_INDEP) and $arch_all;
+ next if build_has_none(BUILD_ARCH_DEP) and not $arch_all;
+
+ $distbinaries{$file->{package}} = 1 if defined $file->{package};
+ }
+
my $path = "$uploadfilesdir/$file->{filename}";
$checksums->add_from_file($path, key => $file->{filename});
@@ -398,7 +407,7 @@ if (build_has_any(BUILD_BINARY)) {
$fields->{'Format'} = $buildinfo_format;
$fields->{'Source'} = $spackage;
-$fields->{'Binary'} = join(' ', map { $_->{'Package'} } $control->get_packages());
+$fields->{'Binary'} = join(' ', sort keys %distbinaries);
# Avoid overly long line by splitting over multiple lines.
if (length($fields->{'Binary'}) > 980) {
$fields->{'Binary'} =~ s/(.{0,980}) /$1\n/g;
@@ -424,7 +433,7 @@ if ($use_feature{kernel}) {
$fields->{'Build-Kernel-Version'} = "$kern_rel $kern_ver";
}
-my $cwd = cwd();
+my $cwd = getcwd();
if ($use_feature{path}) {
$fields->{'Build-Path'} = $cwd;
} else {
@@ -438,6 +447,8 @@ if ($use_feature{path}) {
}
}
+$fields->{'Build-Tainted-By'} = "\n" . join "\n", run_vendor_hook('build-tainted-by');
+
$checksums->export_to_control($fields);
$fields->{'Installed-Build-Depends'} = collect_installed_builddeps($control);