summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-05-24 23:27:07 +0200
committerLudovic Courtès <ludo@gnu.org>2016-05-24 23:35:28 +0200
commitf6fee16e9370bdc9e912878706f69355fc40a472 (patch)
tree365e1e52c4d18b6dea9ffb95f8ffde2aeec27c73 /guix/scripts
parentdb761534df3b57122da8e8b05a678182b59a9d3a (diff)
store: 'requisites' now takes a list of store items.
* guix/store.scm (fold-path): Change 'path' to 'paths' and adjust body accordingly. (requisites): Likewise. * guix/scripts/environment.scm (inputs->requisites): Adjust user accordingly. * guix/scripts/size.scm (requisites*): Likewise. * guix/scripts/gc.scm (guix-gc): Likewise. * tests/store.scm ("requisites"): Likewise.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/environment.scm6
-rw-r--r--guix/scripts/gc.scm3
-rw-r--r--guix/scripts/size.scm2
3 files changed, 6 insertions, 5 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 9ba487d1eb..ebe966f9cf 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -333,11 +333,11 @@ requisite store items i.e. the union closure of all the inputs."
(requisites*
(match input
((drv output)
- (derivation->output-path drv output))
+ (list (derivation->output-path drv output)))
((drv)
- (derivation->output-path drv))
+ (list (derivation->output-path drv)))
((? direct-store-path? path)
- path))))
+ (list path)))))
(mlet %store-monad ((reqs (sequence %store-monad
(map input->requisites inputs))))
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 4ec9ff9dca..8db28138c8 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -229,7 +229,8 @@ Invoke the garbage collector.\n"))
((list-references)
(list-relatives references))
((list-requisites)
- (list-relatives requisites))
+ (list-relatives (lambda (store item)
+ (requisites store (list item)))))
((list-referrers)
(list-relatives referrers))
((optimize)
diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm
index 843213834e..c9725aee4c 100644
--- a/guix/scripts/size.scm
+++ b/guix/scripts/size.scm
@@ -122,7 +122,7 @@ substitutes."
(guard (c ((nix-protocol-error? c)
(values (substitutable-requisites store item)
store)))
- (values (requisites store item) store))))
+ (values (requisites store (list item)) store))))
(define (mappend-map mproc lst)
"Apply MPROC to each item of LST and concatenate the resulting list."