[Reproducible-commits] [dpkg] 77/105: scripts: Switch raw information output to use info()

Niko Tyni ntyni at moszumanska.debian.org
Mon May 2 13:49:55 UTC 2016


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

ntyni pushed a commit to branch ntyni/reproducible_builds
in repository dpkg.

commit 579db424c7224009f74056245b46740fc2cfccaf
Author: Guillem Jover <guillem at debian.org>
Date:   Sun Apr 3 13:36:46 2016 +0200

    scripts: Switch raw information output to use info()
---
 debian/changelog             | 1 +
 scripts/dpkg-buildpackage.pl | 6 +++---
 scripts/dpkg-genchanges.pl   | 6 ++++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 74c1062..54eb0e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -70,6 +70,7 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
     - <new-prerm> failed-upgrade <old-version> <new-version>
     Prompted by Andrey Utkin <andrey.krieger.utkin at gmail.com>.
   * Promote a print to a warning for missing control files in dpkg-deb.
+  * Use info() instead of print in dpkg-buildpackage and dpkg-genchanges.
   * Portability:
     - Move DPKG_ADMINDIR environment variable name out from update-alternatives
       code, to make life easier for non-dpkg-based systems.
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index 5a3b634..94be161 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -558,7 +558,7 @@ chdir('..') or syserr('chdir ..');
 withecho('dpkg-source', @source_opts, '--after-build', $dir);
 chdir($dir) or syserr("chdir $dir");
 
-printf "$Dpkg::PROGNAME: %s\n", describe_build($changes->{'Files'});
+info(describe_build($changes->{'Files'}));
 
 run_hook('check', $check_command);
 
@@ -609,7 +609,7 @@ sub mustsetvar {
     error(g_('unable to determine %s'), $text)
 	unless defined($var);
 
-    print "$Dpkg::PROGNAME: $text $var\n";
+    info("$text $var");
     return $var;
 }
 
@@ -625,7 +625,7 @@ sub run_hook {
 
     return if not $cmd;
 
-    print { *STDERR } "$Dpkg::PROGNAME: running hook $name\n";
+    info("running hook $name");
 
     my %hook_vars = (
         '%' => '%',
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index bcb39ae..09cdf5a 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -179,6 +179,9 @@ while (@ARGV) {
     }
 }
 
+# Do not pollute STDOUT with info messages.
+report_options(info_fh => \*STDERR, quiet_warnings => $quiet);
+
 # Retrieve info from the current changelog entry
 my %options = (file => $changelogfile);
 $options{changelogformat} = $changelogformat if $changelogformat;
@@ -413,8 +416,7 @@ for my $p (keys %p2f) {
     }
 }
 
-print { *STDERR } "$Dpkg::PROGNAME: $origsrcmsg\n"
-    or syserr(g_('write original source message')) unless $quiet;
+info($origsrcmsg);
 
 $fields->{'Format'} = $substvars->get('Format');
 

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