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 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`.t' type='search' size='10' name='q' value=''/>
path: root/gnu/packages/connman.scm
AgeCommit message (Expand)Author
2022-09-19gnu: connman: Patch CVE-2022-32392, CVE-2022-32293....* gnu/packages/connman.scm (connman)[source]: Add patches. * gnu/packages/patches/connman-CVE-2022-32292.patch, gnu/packages/patches/connman-CVE-2022-32293-pt1.patch, gnu/packages/patches/connman-CVE-2022-32293-pt1.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. Efraim Flashner
2022-07-31gnu: qttools: Rename to qttools-5....Automated with: git grep -l qttools | xargs sed 's/\bqttools\b/\0-5/g' -i git checkout NEWS Maxim Cournoyer
2022-07-06gnu: connman: Fix cross-compilation....* gnu/packages/connman.scm (connman): Fix cross-compilation. [arguments]: Use G-Expressions. Set path to binaries at `#:configure-flags'. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Jean-Pierre De Jesus DIAZ