mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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.
This commit is contained in:
parent
1bfaae25fa
commit
e0b07ccc1a
1 changed files with 4 additions and 13 deletions
|
@ -534,15 +534,6 @@ (define-public rust-1.20
|
|||
(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 @@ (define-public rust-1.20
|
|||
(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 @@ (define-public rust-1.24
|
|||
;; 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
|
||||
|
|
Loading…
Reference in a new issue