diff --git a/core/src/magic.sld b/core/src/magic.sld index 96ce27c..bd39c97 100644 --- a/core/src/magic.sld +++ b/core/src/magic.sld @@ -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)