[dpkg] 151/187: dpkg-gencontrol: Do substvar instantiation just once
Reiner Herrmann
reiner at reiner-h.de
Sun Nov 6 12:46:39 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 e977c30856fda238027cec2efa9ab888c04c8757
Author: Guillem Jover <guillem at debian.org>
Date: Wed Nov 2 01:14:51 2016 +0100
dpkg-gencontrol: Do substvar instantiation just once
Do it before perparing for the final output, instead of doing it per
some specific fields and then a global one immediately before output.
---
debian/changelog | 1 +
scripts/dpkg-gencontrol.pl | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e2735f7..60dd9b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
* Give more information on --set-selections warnings. Closes: #842230
* Add new DEB_*_ARCH_ABI and DEB_*_ARCH_LIBC variables to dpkg-architecture
and architecture.mk Makefile fragment.
+ * Do substvar instantiation just once in dpkg-gencontrol.
* Architecture support:
- Add support for AIX operating system.
- Add a version pseudo-field to the arch tables.
diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl
index 8d95610..9157e94 100755
--- a/scripts/dpkg-gencontrol.pl
+++ b/scripts/dpkg-gencontrol.pl
@@ -367,13 +367,14 @@ for my $f (keys %remove) {
delete $fields->{$f};
}
+$fields->apply_substvars($substvars);
+
my $sversion = $fields->{'Version'};
$sversion =~ s/^\d+://;
$forcefilename //= sprintf('%s_%s_%s.%s', $fields->{'Package'}, $sversion,
$fields->{'Architecture'}, $pkg_type);
-$forcefilename = $substvars->substvars($forcefilename);
-my $section = $substvars->substvars($fields->{'Section'} || '-');
-my $priority = $substvars->substvars($fields->{'Priority'} || '-');
+my $section = $fields->{'Section'} || '-';
+my $priority = $fields->{'Priority'} || '-';
# Obtain a lock on debian/control to avoid simultaneous updates
# of debian/files when parallel building is in use
@@ -417,7 +418,6 @@ if (!$stdout) {
$fh_output = \*STDOUT;
}
-$fields->apply_substvars($substvars);
$fields->output($fh_output);
if (!$stdout) {
--
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