mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
Revert "publish: Prevent publication of non-substitutable derivation outputs."
Fixes guix/guix#2450.
This reverts commit b5745a327e
, which introduced
discrepancies in how substitutes are served; in particular, narinfos of
non-substitutable items would still be served, and likewise for narinfos and
nars of dependents of non-substitutable items.
This commit is contained in:
parent
2a42babb2b
commit
e1cf791ddd
2 changed files with 2 additions and 23 deletions
|
@ -61,7 +61,6 @@
|
|||
#:use-module (guix cache)
|
||||
#:use-module (guix ui)
|
||||
#:use-module (guix scripts)
|
||||
#:use-module (guix derivations)
|
||||
#:use-module ((guix utils)
|
||||
#:select (with-atomic-file-output compressed-file?))
|
||||
#:use-module ((guix build utils)
|
||||
|
@ -694,14 +693,11 @@ requested using POOL."
|
|||
(define* (render-nar store request store-item
|
||||
#:key (compression %no-compression))
|
||||
"Render archive of the store path corresponding to STORE-ITEM."
|
||||
(let* ((store-path (string-append %store-directory "/" store-item))
|
||||
(derivations (map read-derivation-from-file
|
||||
(valid-derivers store store-path)))
|
||||
(substitutable? (every substitutable-derivation? derivations)))
|
||||
(let ((store-path (string-append %store-directory "/" store-item)))
|
||||
;; The ISO-8859-1 charset *must* be used otherwise HTTP clients will
|
||||
;; interpret the byte stream as UTF-8 and arbitrarily change invalid byte
|
||||
;; sequences.
|
||||
(if (and substitutable? (valid-path? store store-path))
|
||||
(if (valid-path? store store-path)
|
||||
(values `((content-type . (application/x-nix-archive
|
||||
(charset . "ISO-8859-1")))
|
||||
(x-nar-compression . ,compression))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue