summaryrefslogtreecommitdiff
path: root/guix/scripts/gc.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-03-27 14:16:19 +0200
committerLudovic Courtès <ludo@gnu.org>2018-03-27 14:51:44 +0200
commit8980eea5ab6f89e7649d9abf0be2a9d49156f7d2 (patch)
tree4f9788709a42f67bd11117b4b91660454b128eca /guix/scripts/gc.scm
parentb06a70e05dc6252a3ecb28db5898de7ebc110973 (diff)
guix gc: Add '--derivers'.
* guix/scripts/gc.scm (show-help, %options): Add '--derivers'. (guix-gc): Handle 'list-derivers'. * tests/guix-gc.sh: Add test. * doc/guix.texi (Invoking guix gc): Document it.
Diffstat (limited to 'guix/scripts/gc.scm')
-rw-r--r--guix/scripts/gc.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index a31d2236b0..e4ed7227ff 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,6 +61,8 @@ Invoke the garbage collector.\n"))
-R, --requisites list the requisites of PATHS"))
(display (G_ "
--referrers list the referrers of PATHS"))
+ (display (G_ "
+ --derivers list the derivers of PATHS"))
(newline)
(display (G_ "
--verify[=OPTS] verify the integrity of the store; OPTS is a
@@ -153,6 +155,10 @@ Invoke the garbage collector.\n"))
(lambda (opt name arg result)
(alist-cons 'action 'list-referrers
(alist-delete 'action result))))
+ (option '("derivers") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'action 'list-derivers
+ (alist-delete 'action result))))
(option '("list-failures") #f #f
(lambda (opt name arg result)
(alist-cons 'action 'list-failures
@@ -241,6 +247,8 @@ Invoke the garbage collector.\n"))
(requisites store (list item)))))
((list-referrers)
(list-relatives referrers))
+ ((list-derivers)
+ (list-relatives valid-derivers))
((optimize)
(assert-no-extra-arguments)
(optimize-store store))