(zilch lang rust): remove lack-of-vfs workarounds
This commit is contained in:
parent
59dc27b94c
commit
e42315e67a
3 changed files with 29 additions and 20 deletions
|
|
@ -185,21 +185,38 @@
|
|||
|
||||
(define context-to-build '())
|
||||
(define drv-output-map #f)
|
||||
(define placeholders-to-build '())
|
||||
|
||||
(define (check-output-needs-building output-name output drv)
|
||||
(when (and (derivation-output-placeholder? output) (string-contains path (derivation-output-path output)))
|
||||
(unless drv-output-map
|
||||
(set! drv-output-map (daemon-wop-query-derivation-output-map (*daemon*) (derivation-path drv))))
|
||||
(let ((known-path (cdr (assoc output-name drv-output-map))))
|
||||
(unless known-path
|
||||
(set! placeholders-to-build (cons (string-append (derivation-path drv) "!" output-name) placeholders-to-build))))))
|
||||
|
||||
(define (process-output output-name output drv)
|
||||
(define needs-building #f)
|
||||
(when (and (derivation-output-placeholder? output) (string-contains path (derivation-output-path output)))
|
||||
(unless drv-output-map
|
||||
(set! drv-output-map (daemon-wop-query-derivation-output-map (*daemon*) (derivation-path drv))))
|
||||
(unless (assoc output-name drv-output-map)
|
||||
(daemon-wop-build-paths (*daemon*) (vector (string-append (derivation-path drv) "!" output-name)))
|
||||
(set! drv-output-map (daemon-wop-query-derivation-output-map (*daemon*) (derivation-path drv))))
|
||||
(let* ((known-path (cdr (assoc output-name drv-output-map)))
|
||||
(is-replaced (replace-placeholder (derivation-output-path output) known-path 0)))
|
||||
(when (and is-replaced (not (file-exists? known-path)))
|
||||
(set! needs-building #t))))
|
||||
(when (or needs-building (not (or (derivation-output-placeholder? output) (file-exists? (derivation-output-path output)))))
|
||||
(set! context-to-build (cons (string-append (derivation-path drv) "!" output-name) context-to-build))))
|
||||
|
||||
(for-each
|
||||
(lambda (drv-outputs)
|
||||
(set! drv-output-map #f)
|
||||
(for-each
|
||||
(lambda (output-name)
|
||||
(check-output-needs-building output-name (cdr (assoc output-name (derivation-outputs (car drv-outputs)))) (car drv-outputs)))
|
||||
(cdr drv-outputs)))
|
||||
drv-context)
|
||||
(unless (null? placeholders-to-build)
|
||||
(daemon-wop-build-paths (*daemon*) (list->vector placeholders-to-build)))
|
||||
(for-each
|
||||
(lambda (drv-outputs)
|
||||
(set! drv-output-map #f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue