summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2010-02-21 02:39:44 +0100
committerRaphaël Hertzog <hertzog@debian.org>2010-02-21 02:39:44 +0100
commitc9ccd372fb9655493cd527c37e51a7bd035370cc (patch)
treef6ac52b0ad1fedd7582a7a707e8f9b59a1cf2c2e /scripts/Dpkg/Control
parent51741049b5d8df648e6a08f663bf87c4b5f00529 (diff)
downloaddpkg-c9ccd372fb9655493cd527c37e51a7bd035370cc.tar.gz
dpkg-gencontrol: now indicates which package is concerned by the substvars warnings
Enhance Dpkg::Substvarst to be able to display a prefix before its warnings and errors and make use of that facility in dpkg-gencontrol to be explicit about where the substitution is done.
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r--scripts/Dpkg/Control/Hash.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm
index 6b9f9d5de..b613da40d 100644
--- a/scripts/Dpkg/Control/Hash.pm
+++ b/scripts/Dpkg/Control/Hash.pm
@@ -339,7 +339,7 @@ the corresponding value stored in the Dpkg::Substvars object.
=cut
sub apply_substvars {
- my ($self, $substvars) = @_;
+ my ($self, $substvars, %opts) = @_;
# Add substvars to refer to other fields
foreach my $f (keys %$self) {
@@ -348,7 +348,7 @@ sub apply_substvars {
}
foreach my $f (keys %$self) {
- my $v = $substvars->substvars($self->{$f});
+ my $v = $substvars->substvars($self->{$f}, %opts);
if ($v ne $self->{$f}) {
# If we replaced stuff, ensure we're not breaking
# a dependency field by introducing empty lines, or multiple