(zilch magic): purposely dangle self-references in IA->CA handling
This is to workaround an issue I don't know how to fix right now. In effect: Some of the Nix code contains the placeholder for $out, which then gets translated to $out for that store path. Converting that fails, for obvious reasons. However, rewriting those to self-references is more complicated than I want to get into right now, and as the behavior of self-references is vaguely broken (and this only affects one test and a comment), I'm going to take the easy way out and make it generate a dangling reference.
This commit is contained in:
parent
8e2f0f3014
commit
84748541c7
1 changed files with 3 additions and 3 deletions
|
|
@ -59,7 +59,7 @@
|
|||
; It turns out these are broken in both Nix and Lix.
|
||||
; Also, I now don't have to implement the _second_ type of modulo
|
||||
; hash in Scheme, so that's a win for me.
|
||||
(error "Refusing to import self-referenced CA path into the store.")
|
||||
(fprintf (current-error-port) "Path ~S has self-reference, this will dangle!\n" path)
|
||||
(if (null? (cdr self-references))
|
||||
(set! references-filtered '())
|
||||
(begin
|
||||
|
|
@ -70,9 +70,9 @@
|
|||
(set-cdr! self-references (cddr self-references)))))
|
||||
|
||||
(define name (string-copy path (+ (string-length (%store-dir)) 1 32 1)))
|
||||
(define ca-store-path (make-fixed-output-with-references hash name references-filtered self-references))
|
||||
(define ca-store-path (make-fixed-output-with-references hash name references-filtered #f))
|
||||
(unless (daemon-wop-query-path-info conn ca-store-path)
|
||||
(daemon-wop-add-to-store-nar conn ca-store-path (valid-path-info-deriver data) (hex hash) references nar-size (string-append "fixed:r:sha256:" (as-base32 hash))
|
||||
(daemon-wop-add-to-store-nar conn ca-store-path (valid-path-info-deriver data) (hex hash) references-filtered nar-size (string-append "fixed:r:sha256:" (as-base32 hash))
|
||||
(lambda (write-blob)
|
||||
(define new-conn (daemon-connect))
|
||||
(daemon-wop-nar-from-path new-conn path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue