mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
refresh: Add '--expression'.
* guix/scripts/refresh.scm (%options, show-help): Add --expression. (guix-refresh): Honor it. * doc/guix.texi (Invoking guix refresh): Document it.
This commit is contained in:
parent
160b0ef3fd
commit
2d7fc7daf1
2 changed files with 20 additions and 0 deletions
|
@ -4277,6 +4277,19 @@ The following options are supported:
|
|||
|
||||
@table @code
|
||||
|
||||
@item --expression=@var{expr}
|
||||
@itemx -e @var{expr}
|
||||
Consider the package @var{expr} evaluates to.
|
||||
|
||||
This is useful to precisely refer to a package, as in this example:
|
||||
|
||||
@example
|
||||
guix refresh -l -e '(@@@@ (gnu packages commencement) glibc-final)'
|
||||
@end example
|
||||
|
||||
This command lists the dependents of the ``final'' libc (essentially all
|
||||
the packages.)
|
||||
|
||||
@item --update
|
||||
@itemx -u
|
||||
Update distribution source files (package recipes) in place. This is
|
||||
|
|
|
@ -80,6 +80,9 @@ (define %options
|
|||
(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)))
|
||||
|
@ -115,6 +118,8 @@ (define (show-help)
|
|||
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 (_ "
|
||||
|
@ -348,6 +353,8 @@ (define core-package?
|
|||
;; 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
|
||||
|
|
Loading…
Reference in a new issue