[Reproducible-commits] [strip-nondeterminism] 01/04: dh_s_nd: work around lack of get_source_date_epoch in old debhelper
Andrew Ayer
agwa at andrewayer.name
Tue Sep 22 14:13:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
agwa-guest pushed a commit to branch debian
in repository strip-nondeterminism.
commit 95dc30b0bcf0cbf085c1722f603dc3e8bc22ba20
Author: Andrew Ayer <agwa at andrewayer.name>
Date: Tue Sep 22 06:32:58 2015 -0700
dh_s_nd: work around lack of get_source_date_epoch in old debhelper
Closes: #799732
---
bin/dh_strip_nondeterminism | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/bin/dh_strip_nondeterminism b/bin/dh_strip_nondeterminism
index adebce5..96792f0 100755
--- a/bin/dh_strip_nondeterminism
+++ b/bin/dh_strip_nondeterminism
@@ -72,7 +72,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
find(\&testfile,$tmp);
next unless @nondeterministic_files;
- $File::StripNondeterminism::canonical_time = get_source_date_epoch();
+ $File::StripNondeterminism::canonical_time = eval { get_source_date_epoch() };
+ if (not defined $File::StripNondeterminism::canonical_time) {
+ # Hack for old versions of debhelper
+ isnative($package); # Sets $dh{DATE} as a side-effect
+ $File::StripNondeterminism::canonical_time = str2time($dh{DATE});
+ }
foreach (@nondeterministic_files) {
my ($path, $normalize) = @$_;
--
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