[dpkg] 155/192: dpkg-genchanges: Honor substvars in Description field

Ximin Luo infinity0 at debian.org
Tue Oct 17 11:04:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit fc57bf83dcb089b1cca96f6c08b2b375cc693995
Author: Guillem Jover <guillem at debian.org>
Date:   Sun Apr 9 04:15:11 2017 +0200

    dpkg-genchanges: Honor substvars in Description field
    
    This field can have substvars applied in the binary package, so it is a
    safe replacement compared to all other output fields. More so with the
    newly introduced S:<source-field> style automatic substvars.
    
    Closes: #856547
---
 debian/changelog           | 2 ++
 man/dpkg-genchanges.man    | 6 ++++--
 scripts/dpkg-genchanges.pl | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 862aff7..984d655 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,8 @@ dpkg (1.19.0) UNRELEASED; urgency=medium
   * Add support for a new Build-Kernel-Version field in .buildinfo files,
     that can be emitted with a new dpkg-genbuildinfo --always-include-kernel
     option. Closes: #873937
+  * Make dpkg-genchanges honor substvars in .changes Description field.
+    Closes: #856547
   * Perl modules:
     - Switch from Dpkg::Util to List::Util, now that the module in the
       new required Perl contains the needed functions.
diff --git a/man/dpkg-genchanges.man b/man/dpkg-genchanges.man
index 0d7d3e2..99ec93d 100644
--- a/man/dpkg-genchanges.man
+++ b/man/dpkg-genchanges.man
@@ -132,8 +132,10 @@ Read substitution variables in
 the default is
 .BR debian/substvars .
 No variable substitution is done on any of the fields that are output,
-however the special variable \fIFormat\fR will override the field of the
-same name. This option can be used multiple times to read substitution
+except for the contents extracted from each binary package \fBDescription\fP
+field (since dpkg 1.19.0), however the special variable \fIFormat\fR will
+override the field of the same name.
+This option can be used multiple times to read substitution
 variables from multiple files (since dpkg 1.15.6).
 
 .TP
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index e8c86fe..8d56bbd 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -353,6 +353,7 @@ foreach my $pkg ($control->get_packages()) {
     push @f, @{$p2f{$p}} if defined $p2f{$p};
 
     # Add description of all binary packages
+    $d = $substvars->substvars($d);
     my $desc = encode_utf8(sprintf('%-10s - %-.65s', $p, decode_utf8($d)));
     $desc .= " ($pkg_type)" if $pkg_type ne 'deb';
     push @descriptions, $desc;

-- 
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