summaryrefslogtreecommitdiff
path: root/scripts/dpkg-source.pl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-04-03 06:08:45 +0200
committerGuillem Jover <guillem@debian.org>2014-04-21 16:29:58 +0200
commit03dc67940a1bcdfba6732e257fe1f35f59aea8f6 (patch)
treed5d3cab0d49898557907d36b96d6bc31fd98c205 /scripts/dpkg-source.pl
parentb916e61f0feb8eb37d9f00bbd4066c4f1b53babe (diff)
downloaddpkg-03dc67940a1bcdfba6732e257fe1f35f59aea8f6.tar.gz
dpkg-source: Add arch and profile information to Package-List field
Add two new optional values to the Packages-List field, with architecture and build-profiles information. These values have the form «name=value1,value2», and might appear in any order after the mandatory values. This allows to run bootstrapping analysis over the Sources package indices. Requested-by: Johannes Schauer <j.schauer@email.de> Suggested-by: Raphaël Hertzog <hertzog@debian.org>
Diffstat (limited to 'scripts/dpkg-source.pl')
-rwxr-xr-xscripts/dpkg-source.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index 7e96ce189..3153f7bc2 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -267,7 +267,16 @@ if ($options{opmode} =~ /^(-b|--print-format|--(before|after)-build|--commit)$/)
my $prio = $pkg->{'Priority'} || $src_prio;
my $type = $pkg->{'Package-Type'} ||
$pkg->get_custom_field('Package-Type') || 'deb';
- push @pkglist, sprintf('%s %s %s %s', $p, $type, $sect, $prio);
+ my $arch = $pkg->{'Architecture'};
+ my $profile = $pkg->{'Build-Profiles'};
+
+ my $pkg_summary = sprintf('%s %s %s %s', $p, $type, $sect, $prio);
+
+ $pkg_summary .= ' arch=' . join ',', split /\s+/, $arch;
+ $pkg_summary .= ' profile=' . join ',', split /\s+/, $profile
+ if defined $profile;
+
+ push @pkglist, $pkg_summary;
push @binarypackages, $p;
foreach (keys %{$pkg}) {
my $v = $pkg->{$_};