me
/
guix
Archived
1
0
Fork 0

gnu: racket: Remove obsolete patch.

* gnu/packages/racket.scm (racket)[source](patches): Remove
"racket-store-checksum-override.patch", which is no longer needed since
we stopped injecting store paths into Racket files in commit 834aa48:
see <https://issues.guix.gnu.org/47180>.
* gnu/packages/patches/racket-store-checksum-override.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Philip McGrath 2021-04-16 17:11:37 -04:00 committed by Ludovic Courtès
parent 3df04eb09f
commit cd9454f6ed
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 1 additions and 48 deletions

View File

@ -1651,7 +1651,6 @@ dist_patch_DATA = \
%D%/packages/patches/rpcbind-CVE-2017-8779.patch \
%D%/packages/patches/rtags-separate-rct.patch \
%D%/packages/patches/racket-sh-via-rktio.patch \
%D%/packages/patches/racket-store-checksum-override.patch \
%D%/packages/patches/remake-impure-dirs.patch \
%D%/packages/patches/retroarch-LIBRETRO_DIRECTORY.patch \
%D%/packages/patches/rnp-add-version.cmake.patch \

View File

@ -1,42 +0,0 @@
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
@@ -6,6 +6,7 @@
racket/list
racket/path
racket/promise
+ racket/string
file/sha1
setup/cross-system
compiler/compilation-path
@@ -268,7 +269,8 @@
(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
@@ -1012,5 +1014,9 @@
#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)))
+
;; Make sure `recompile-from` is machine-independent so that
;; recompilation makes sense.
;; The compilation lock must is held for the source of `recompile-from`.

View File

@ -63,11 +63,7 @@
(base32
"047wpjblfzmf1msz7snrp2c2h0zxyzlmbsqr9bwsyvz3frcg0888"))
(patches (search-patches
"racket-sh-via-rktio.patch"
;; TODO: If we're no longer patching Racket source
;; files with store paths, we may also fix the
;; issue that necessitated the following patch:
"racket-store-checksum-override.patch"))))
"racket-sh-via-rktio.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags