diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-05-27 23:19:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-05-27 23:19:49 +0200 |
commit | af018f5e0a1b7c67e9f40ca68929bd35b94206d3 (patch) | |
tree | 8c3efe66f8ac1f6178357937c0a41c6f5ff8f0f8 /guix/ui.scm | |
parent | d84a7be6675bd647931d8eff9134d00dd5a6bd58 (diff) | |
parent | 35066aa596931ef84922298c2760ceba69940cd1 (diff) | |
download | guix-patches-af018f5e0a1b7c67e9f40ca68929bd35b94206d3.tar guix-patches-af018f5e0a1b7c67e9f40ca68929bd35b94206d3.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/ui.scm')
-rw-r--r-- | guix/ui.scm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/guix/ui.scm b/guix/ui.scm index 944c9f87fa..48b5c745c6 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -241,7 +241,7 @@ interpreted." str args))))) (catch #t (lambda () - (eval exp the-scm-module)) + (eval exp the-root-module)) (lambda args (leave (_ "failed to evaluate expression `~a': ~s~%") exp args))))) @@ -261,6 +261,14 @@ error." derivations listed in DRV. Return #t if there's something to build, #f otherwise. When USE-SUBSTITUTES?, check and report what is prerequisites are available for download." + (define (built-or-substitutable? drv) + (let ((out (derivation->output-path drv))) + ;; If DRV has zero outputs, OUT is #f. + (or (not out) + (or (valid-path? store out) + (and use-substitutes? + (has-substitutes? store out)))))) + (let*-values (((build download) (fold2 (lambda (drv build download) (let-values (((b d) @@ -275,14 +283,7 @@ available for download." ((build) ; add the DRV themselves (delete-duplicates (append (map derivation-file-name - (remove (lambda (drv) - (let ((out (derivation->output-path - drv))) - (or (valid-path? store out) - (and use-substitutes? - (has-substitutes? store - out))))) - drv)) + (remove built-or-substitutable? drv)) (map derivation-input-path build)))) ((download) ; add the references of DOWNLOAD (if use-substitutes? |