[Reproducible-commits] [dpkg] 08/40: Dpkg::Shlibs::SymbolFile: Do not replace #PACKAGE# in template mode
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat May 30 09:52:47 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 89c443f4d4bf27b8c1a57708b9fd83344d93bc65
Author: Guillem Jover <guillem at debian.org>
Date: Wed May 20 21:32:11 2015 +0200
Dpkg::Shlibs::SymbolFile: Do not replace #PACKAGE# in template mode
These markers get instantiated when generating the output files,
replacing them when generating a template is wrong.
---
debian/changelog | 1 +
scripts/Dpkg/Shlibs/SymbolFile.pm | 12 +++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 1a29868..fdbac7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ dpkg (1.18.1) UNRELEASED; urgency=low
- Add missing strict and warnings pragmas for submodules.
- Use non-destructive substitutions inside map.
- Use the state keyword to simplify the code.
+ - Do not replace #PACKAGE# in template mode in Dpkg::Shlibs::SymbolFile.
[ Updated programs translations ]
* German (Sven Joachim).
diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm b/scripts/Dpkg/Shlibs/SymbolFile.pm
index fd49108..c01292b 100644
--- a/scripts/Dpkg/Shlibs/SymbolFile.pm
+++ b/scripts/Dpkg/Shlibs/SymbolFile.pm
@@ -286,19 +286,25 @@ sub output {
foreach my $soname (sort $self->get_sonames()) {
my @deps = $self->get_dependencies($soname);
my $dep_first = shift @deps;
- $dep_first =~ s/#PACKAGE#/$opts{package}/g if exists $opts{package};
+ if (exists $opts{package} and not $opts{template_mode}) {
+ $dep_first =~ s/#PACKAGE#/$opts{package}/g;
+ }
print { $fh } "$soname $dep_first\n" if defined $fh;
$res .= "$soname $dep_first\n" if defined wantarray;
foreach my $dep_next (@deps) {
- $dep_next =~ s/#PACKAGE#/$opts{package}/g if exists $opts{package};
+ if (exists $opts{package} and not $opts{template_mode}) {
+ $dep_next =~ s/#PACKAGE#/$opts{package}/g;
+ }
print { $fh } "| $dep_next\n" if defined $fh;
$res .= "| $dep_next\n" if defined wantarray;
}
my $f = $self->{objects}{$soname}{fields};
foreach my $field (sort keys %{$f}) {
my $value = $f->{$field};
- $value =~ s/#PACKAGE#/$opts{package}/g if exists $opts{package};
+ if (exists $opts{package} and not $opts{template_mode}) {
+ $value =~ s/#PACKAGE#/$opts{package}/g;
+ }
print { $fh } "* $field: $value\n" if defined $fh;
$res .= "* $field: $value\n" if defined wantarray;
}
--
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