[strip-nondeterminism] 05/05: jar.pm: Clojure considers the .class file to be stale if it shares the same timestamp of the .clj. We thus adjust the timestamps of the .clj to always be younger. (Closes: #877418)

Chris Lamb chris at chris-lamb.co.uk
Tue Oct 3 13:56:15 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 7691e2980274c1b041b8730bae5a8f5374cbcbf1
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Oct 3 14:55:23 2017 +0100

    jar.pm: Clojure considers the .class file to be stale if it shares the same timestamp of the .clj. We thus adjust the timestamps of the .clj to always be younger. (Closes: #877418)
---
 lib/File/StripNondeterminism/handlers/jar.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/File/StripNondeterminism/handlers/jar.pm b/lib/File/StripNondeterminism/handlers/jar.pm
index 80cbfad..9342aae 100644
--- a/lib/File/StripNondeterminism/handlers/jar.pm
+++ b/lib/File/StripNondeterminism/handlers/jar.pm
@@ -92,6 +92,12 @@ sub _jar_normalize_member($$) {
 		# maven header should be within first 1kb of file
 		File::StripNondeterminism::handlers::zip::normalize_member($member,
 			\&File::StripNondeterminism::handlers::javaproperties::normalize);
+	} elsif ($member->fileName() =~ /\.clj$/) {
+		# Clojure considers the .class file to be stale if it shares
+		# the same timestamp of the .clj. We thus adjust the timestamps
+		# of the .clj to always be younger. We do not need to worry
+		# about underflowing due to SAFE_EPOCH.
+		$timestamp--;
 	} elsif ($member->fileName() =~ /\.jar$/) {
 		File::StripNondeterminism::handlers::zip::normalize_member($member,
 			\&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