[Reproducible-commits] [dpkg] 44/90: dpkg-gencontrol: Use $oppackage only to get a control file's package name
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat Aug 29 18:26:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit 89d9dd6870349fd3e103ae26ea072b80f2f46c84
Author: Guillem Jover <guillem at debian.org>
Date: Wed Jul 1 05:20:00 2015 +0200
dpkg-gencontrol: Use $oppackage only to get a control file's package name
The authoritative package name later on should come from the actual
fields.
---
scripts/dpkg-gencontrol.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl
index 89cad86..299f1f0 100755
--- a/scripts/dpkg-gencontrol.pl
+++ b/scripts/dpkg-gencontrol.pl
@@ -313,7 +313,6 @@ for my $f (qw(Maintainer Description Architecture)) {
warning(g_('missing information for output field %s'), $f)
unless defined $fields->{$f};
}
-$oppackage = $fields->{'Package'};
my $pkg_type = $pkg->{'Package-Type'} ||
$pkg->get_custom_field('Package-Type') || 'deb';
@@ -329,8 +328,9 @@ if ($pkg_type eq 'udeb') {
}
my $sourcepackage = get_source_package();
+my $binarypackage = $fields->{'Package'};
my $verdiff = $binaryversion ne $sourceversion;
-if ($oppackage ne $sourcepackage || $verdiff) {
+if ($binarypackage ne $sourcepackage || $verdiff) {
$fields->{'Source'} = $sourcepackage;
$fields->{'Source'} .= ' (' . $sourceversion . ')' if $verdiff;
}
@@ -373,7 +373,7 @@ for my $f (keys %remove) {
my $sversion = $fields->{'Version'};
$sversion =~ s/^\d+://;
-$forcefilename //= sprintf('%s_%s_%s.%s', $oppackage, $sversion,
+$forcefilename //= sprintf('%s_%s_%s.%s', $fields->{'Package'}, $sversion,
$fields->{'Architecture'} || '', $pkg_type);
$forcefilename = $substvars->substvars($forcefilename);
my $section = $substvars->substvars($fields->{'Section'} || '-');
@@ -394,7 +394,7 @@ $dist->load($fileslistfile) if -e $fileslistfile;
foreach my $file ($dist->get_files()) {
if (defined $file->{package} &&
- ($file->{package} eq $oppackage) &&
+ ($file->{package} eq $fields->{'Package'}) &&
($file->{package_type} eq $pkg_type) &&
(debarch_eq($file->{arch}, $fields->{'Architecture'} || '') ||
debarch_eq($file->{arch}, 'all'))) {
--
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