summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-11-23 17:47:22 +0100
committerLudovic Courtès <ludo@gnu.org>2015-11-23 17:48:35 +0100
commit2d7fc7daf14e6e965a4d33baa7b9d52873f37691 (patch)
treec0056157d2ad51baf441106a28fd3f97ca039e6e /guix
parent160b0ef3fd87c73b140f4480a521ad8c80475ab3 (diff)
refresh: Add '--expression'.
* guix/scripts/refresh.scm (%options, show-help): Add --expression. (guix-refresh): Honor it. * doc/guix.texi (Invoking guix refresh): Document it.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/refresh.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index c9eff7ba67..8e8a34bd0f 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -80,6 +80,9 @@
(option '(#\L "list-updaters") #f #f
(lambda args
(list-updaters-and-exit)))
+ (option '(#\e "expression") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'expression arg result)))
(option '(#\l "list-dependent") #f #f
(lambda (opt name arg result)
(alist-cons 'list-dependent? #t result)))
@@ -116,6 +119,8 @@ When PACKAGE... is given, update only the specified packages. Otherwise
update all the packages of the distribution, or the subset thereof
specified with `--select'.\n"))
(display (_ "
+ -e, --expression=EXPR consider the package EXPR evaluates to"))
+ (display (_ "
-u, --update update source files in place"))
(display (_ "
-s, --select=SUBSET select all the packages in SUBSET, one of
@@ -348,6 +353,8 @@ update would trigger a complete rebuild."
;; Take either the specified version or the
;; latest one.
(specification->package spec))
+ (('expression . exp)
+ (read/eval-package-expression exp))
(_ #f))
opts)
(() ; default to all packages