aboutsummaryrefslogtreecommitdiff
path: root/guix/store.scm
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/store.scm
parentdb761534df3b57122da8e8b05a678182b59a9d3a (diff)
downloadgnu-guix-f6fee16e9370bdc9e912878706f69355fc40a472.tar
gnu-guix-f6fee16e9370bdc9e912878706f69355fc40a472.tar.gz
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/store.scm')
-rw-r--r--guix/store.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 4d89f4a413..e3033ee61a 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -803,12 +803,12 @@ the list of references")
(loop items tail
(cons head result)))))))))
-(define* (fold-path store proc seed path
+(define* (fold-path store proc seed paths
#:optional (relatives (cut references store <>)))
- "Call PROC for each of the RELATIVES of PATH, exactly once, and return the
+ "Call PROC for each of the RELATIVES of PATHS, exactly once, and return the
result formed from the successive calls to PROC, the first of which is passed
SEED."
- (let loop ((paths (list path))
+ (let loop ((paths paths)
(result seed)
(seen vlist-null))
(match paths
@@ -822,10 +822,10 @@ SEED."
(()
result))))
-(define (requisites store path)
- "Return the requisites of PATH, including PATH---i.e., its closure (all its
-references, recursively)."
- (fold-path store cons '() path))
+(define (requisites store paths)
+ "Return the requisites of PATHS, including PATHS---i.e., their closures (all
+its references, recursively)."
+ (fold-path store cons '() paths))
(define (topologically-sorted store paths)
"Return a list containing PATHS and all their references sorted in