~ruther/guix-local

ref: 3bdc0ef2cd9cd9cbcc1aadef7d8fdf6d182e857d guix-local/gnu/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch -rw-r--r-- 657 bytes
3bdc0ef2 — Tobias Geerinckx-Rice gnu: rsync: Update to 3.2.5 [fixes CVE-2022-29154]. 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Fix one of upstream non-determinism, tracked here:

https://github.com/JuliaLang/julia/issues/34115
https://github.com/JuliaLang/julia/issues/25900


Patch by Nicoló Balzarotti <nicolo@nixo.xyz>.

--- a/base/loading.jl
+++ b/base/loading.jl
@@ -807,7 +807,10 @@
         path = normpath(joinpath(dirname(prev), _path))
     end
     if _track_dependencies[]
-        push!(_require_dependencies, (mod, path, mtime(path)))
+          push!(_require_dependencies,
+                (mod, path,
+                 haskey(ENV, "SOURCE_DATE_EPOCH") ?
+                 parse(Float64, ENV["SOURCE_DATE_EPOCH"]) : mtime(path)))
     end
     return path, prev
 end