[strip-nondeterminism] 02/02: Print log entry when fixing a file. (Closes: #777239)

Chris Lamb chris at chris-lamb.co.uk
Thu Feb 9 09:03:53 UTC 2017


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

lamby pushed a commit to branch master
in repository strip-nondeterminism.

commit 506fc41c748f1209224f903a738d14042facffb9
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Feb 9 22:03:42 2017 +1300

    Print log entry when fixing a file. (Closes: #777239)
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 bin/dh_strip_nondeterminism | 3 +++
 bin/strip-nondeterminism    | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bin/dh_strip_nondeterminism b/bin/dh_strip_nondeterminism
index 7e1b632..802561b 100755
--- a/bin/dh_strip_nondeterminism
+++ b/bin/dh_strip_nondeterminism
@@ -79,8 +79,11 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		$File::StripNondeterminism::canonical_time = str2time($dh{DATE});
 	}
 
+	verbose_print("Using $File::StripNondeterminism::canonical_time as canonical time");
+
 	foreach (@nondeterministic_files) {
 		my ($path, $normalize) = @$_;
+		verbose_print("Normalizing $path");
 		eval { $normalize->($path); 1 }
 		  or error("$path: $@");
 	}
diff --git a/bin/strip-nondeterminism b/bin/strip-nondeterminism
index 463fcb8..08b7dc2 100755
--- a/bin/strip-nondeterminism
+++ b/bin/strip-nondeterminism
@@ -29,9 +29,9 @@ Getopt::Long::Configure(qw(no_ignore_case permute bundling));
 my $cmd = $0;
 $cmd =~ s/.*\///;
 my $usage
-  = "Usage: $cmd [-t|--type FILETYPE] [-T|--timestamp SECONDS] [--clamp-timestamp] FILENAME\n";
+  = "Usage: $cmd [-v|--verbose] [-t|--type FILETYPE] [-T|--timestamp SECONDS] [--clamp-timestamp] FILENAME\n";
 
-my ($filetype, $timestamp, $clamp_timestamp, $want_help, $want_version);
+my ($filetype, $timestamp, $clamp_timestamp, $want_help, $verbose, $want_version);
 my $getopt = Getopt::Long::Parser->new;
 $getopt->configure(qw(no_ignore_case permute bundling));
 $getopt->getoptions(
@@ -39,6 +39,7 @@ $getopt->getoptions(
 	'timestamp|T=i', \$timestamp,
 	'clamp-timestamp!', \$clamp_timestamp,
 	'help|h', \$want_help,
+	'verbose|v', \$verbose,
 	'version|V', \$want_version
 ) or die $usage;
 
@@ -73,6 +74,7 @@ for my $filename (@ARGV) {
 		next unless $normalizer;
 	}
 
+	print "Normalizing $filename\n" if $verbose;
 	eval { $normalizer->($filename); 1 }
 	  or die "strip-nondeterminism: $filename: $@";
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/strip-nondeterminism.git



More information about the Reproducible-commits mailing list