guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: rust: Work around mtime bug in rust build helpers.


From: Danny Milosavljevic
Subject: 01/01: gnu: rust: Work around mtime bug in rust build helpers.
Date: Thu, 20 Sep 2018 19:39:19 -0400 (EDT)

dannym pushed a commit to branch master
in repository guix.

commit e0b07ccc1ab0b763f0e9da39f56f2a7aec6116d5
Author: Danny Milosavljevic <address@hidden>
Date:   Thu Sep 20 22:16:45 2018 +0200

    gnu: rust: Work around mtime bug in rust build helpers.
    
    * gnu/packages/rust.scm (rust-1.20)[arguments]<#:phases>[fix-mtime-bug]:
    Delete.
    [reset-timestamps-after-changes]: Modify.
    (rust-1.24): Don't delete "fix-mtime-bug" since now it doesn't ever
    get created.
---
 gnu/packages/rust.scm | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index ec8b30d..e8eca80 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -534,15 +534,6 @@ safety and thread safety guarantees.")
                  (substitute* "src/test/run-pass/out-of-stack.rs"
                    (("// ignore-android") "// ignore-test\n// ignore-android"))
                  #t))
-             (add-after 'ignore-glibc-2.27-incompatible-test 'fix-mtime-bug
-               (lambda* _
-                 (substitute* "src/build_helper/lib.rs"
-                   ;; Bug in Rust code.
-                   ;; Current implementation assume that if dst not exist then 
it's mtime
-                   ;; is 0, but in same time "src" have 0 mtime in guix build!
-                   (("let threshold = mtime\\(dst\\);")
-                    "if !dst.exists() {\nreturn false\n}\n let threshold = 
mtime(dst);"))
-                 #t))
              (replace 'configure
                (lambda* (#:key inputs outputs #:allow-other-keys)
                  (let* ((out (assoc-ref outputs "out"))
@@ -608,10 +599,11 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
              (delete 'patch-cargo-tomls)
              (add-before 'build 'reset-timestamps-after-changes
                (lambda* _
-                 (define ref (stat "README.md"))
                  (for-each
                   (lambda (filename)
-                    (set-file-time filename ref))
+                    ;; Rust 1.20.0 treats timestamp 0 as "file doesn't exist".
+                    ;; Therefore, use timestamp 1.
+                    (utime filename 1 1 1 1))
                   (find-files "." #:directories? #t))
                  #t))
              (replace 'build
@@ -699,8 +691,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    ;; This test is known to fail on aarch64 and powerpc64le:
                    ;; https://github.com/rust-lang/rust/issues/45410
                    (("fn test_loading_cosine") "#[ignore]\nfn 
test_loading_cosine"))
-                 #t))
-             (delete 'fix-mtime-bug))))))))
+                 #t)))))))))
 
 (define-public rust-1.25
   (let ((base-rust



reply via email to

[Prev in Thread] Current Thread [Next in Thread]