summaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2021-01-25 15:21:09 -0500
committerLeo Famulari <leo@famulari.name>2021-01-25 15:40:55 -0500
commit68dd78e2e47248b3e1e7ba1807a92a8374b39097 (patch)
treed38564293f285d688a55b23e8a6424c6b26213b1 /guix/store.scm
parent8b55544212a90b0276df49596a3d373e5c2e8f5c (diff)
parent3f0af15131e524891df8c9f013f1be1597fe2d7e (diff)
downloadguix-patches-68dd78e2e47248b3e1e7ba1807a92a8374b39097.tar
guix-patches-68dd78e2e47248b3e1e7ba1807a92a8374b39097.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm17
1 files changed, 15 insertions, 2 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 4da39971b5..e0b15abce3 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
@@ -114,6 +114,7 @@
query-failed-paths
clear-failed-paths
ensure-path
+ find-roots
add-temp-root
add-indirect-root
add-permanent-root
@@ -340,7 +341,8 @@
(write-string (bytevector->base16-string arg) p))))
(define-syntax read-arg
- (syntax-rules (integer boolean string store-path store-path-list string-list
+ (syntax-rules (integer boolean string store-path
+ store-path-list string-list string-pairs
substitutable-path-list path-info base16)
((_ integer p)
(read-int p))
@@ -354,6 +356,8 @@
(read-store-path-list p))
((_ string-list p)
(read-string-list p))
+ ((_ string-pairs p)
+ (read-string-pairs p))
((_ substitutable-path-list p)
(read-substitutable-path-list p))
((_ path-info p)
@@ -1404,6 +1408,15 @@ running a substitute. As a GC root is not created by the daemon, you may want
to call ADD-TEMP-ROOT on that store path."
boolean)
+(define-operation (find-roots)
+ "Return a list of root/target pairs: for each pair, the first element is the
+GC root file name and the second element is its target in the store.
+
+When talking to a local daemon, this operation is equivalent to the 'gc-roots'
+procedure in (guix store roots), except that the 'find-roots' excludes
+potential roots that do not point to store items."
+ string-pairs)
+
(define-operation (add-temp-root (store-path path))
"Make PATH a temporary root for the duration of the current session.
Return #t."