mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-08 16:06:16 -05:00
948ecc27dd
* gnu/packages/scheme.scm (racket): Update to 7.3. * gnu/packages/patches/racket-store-checksum-override.patch: Update for Racket 7.3.
42 lines
No EOL
1.8 KiB
Diff
42 lines
No EOL
1.8 KiB
Diff
Racket uses checksums to test if it needs to recompile its source
|
|
files to bytecode. If Racket is updated by grafting, the source and
|
|
bytecode files get updated, but the checksum stays the same. Since
|
|
the checksum no longer matches the source file, Racket tries to
|
|
regenerate the bytecode and write it to the store, causing errors
|
|
because the store is immutable. This patch makes Racket ignore
|
|
checksums for files in the store.
|
|
|
|
See <https://debbugs.gnu.org/30680> for details.
|
|
|
|
---
|
|
--- a/collects/compiler/private/cm-minimal.rkt
|
|
+++ b/collects/compiler/private/cm-minimal.rkt
|
|
@@ -7,6 +7,7 @@
|
|
racket/list
|
|
racket/path
|
|
racket/promise
|
|
+ racket/string
|
|
file/sha1
|
|
setup/collects
|
|
setup/cross-system
|
|
@@ -940,6 +941,10 @@
|
|
#f
|
|
(list src-hash recorded-hash)))
|
|
|
|
+(define (store-reference? path)
|
|
+ (let ([store-prefix (or (getenv "NIX_STORE") "/gnu/store")])
|
|
+ (string-prefix? (path->string path) store-prefix)))
|
|
+
|
|
(define (rkt->ss p)
|
|
(if (path-has-extension? p #".rkt")
|
|
(path-replace-extension p #".ss")
|
|
@@ -1015,6 +1020,7 @@
|
|
(trace-printf "newer src... ~a > ~a" path-time path-zo-time)
|
|
(maybe-compile-zo deps path->mode roots path orig-path read-src-syntax up-to-date collection-cache new-seen
|
|
#:trying-sha1? sha1-only?)]
|
|
- [(different-source-sha1-and-dep-recorded path deps)
|
|
+ [(and (not (store-reference? path))
|
|
+ (different-source-sha1-and-dep-recorded path deps))
|
|
=> (lambda (difference)
|
|
(trace-printf "different src hash ~a for ~a..." difference path)
|
|
(maybe-compile-zo deps path->mode roots path orig-path read-src-syntax up-to-date collection-cache new-seen
|