summaryrefslogtreecommitdiff
path: root/guix/scripts/refresh.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-06-19 15:28:19 +0200
committerLudovic Courtès <ludo@gnu.org>2022-06-22 23:43:22 +0200
commitbdf422176739b473add66eb8cac9fdd8c654f794 (patch)
treedfe2dd522ad8840938349744a87c97524f8ca432 /guix/scripts/refresh.scm
parent2ccbf3a45ccb5b1ac469f3d429faf4c51c56f38a (diff)
refresh: Repurpose '-L' for '--load-path'.
This incompatible change fixes an inconsistency with other commands where '-L' is short for '--load-path'. * guix/scripts/refresh.scm (%options): Add --load-path option from %STANDARD-BUILD-OPTIONS. Remove #\L shortcut for --list-updaters, and remove --load-path option that lacked the #\L shortcut. (show-help): Update accordingly. * doc/guix.texi (Invoking guix refresh): Update accordingly.
Diffstat (limited to 'guix/scripts/refresh.scm')
-rw-r--r--guix/scripts/refresh.scm22
1 files changed, 6 insertions, 16 deletions
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index 4d52200b84..14329751f8 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -81,7 +81,10 @@
(names (map string->symbol
(string-tokenize arg not-comma))))
(alist-cons 'updaters names result))))
- (option '(#\L "list-updaters") #f #f
+ (find (lambda (option)
+ (member "load-path" (option-names option)))
+ %standard-build-options)
+ (option '("list-updaters") #f #f
(lambda args
(list-updaters-and-exit)))
(option '(#\m "manifest") #t #f
@@ -119,19 +122,6 @@
(leave (G_ "unsupported policy: ~a~%")
arg)))))
- ;; The short option -L is already used by --list-updaters, therefore
- ;; it needs to be removed from %standard-build-options.
- (let ((load-path-option (find (lambda (option)
- (member "load-path"
- (option-names option)))
- %standard-build-options)))
- (option
- (filter (lambda (name) (not (equal? #\L name)))
- (option-names load-path-option))
- (option-required-arg? load-path-option)
- (option-optional-arg? load-path-option)
- (option-processor load-path-option)))
-
(option '(#\h "help") #f #f
(lambda args
(show-help)
@@ -160,7 +150,7 @@ specified with `--select'.\n"))
-t, --type=UPDATER,... restrict to updates from the specified updaters
(e.g., 'gnu')"))
(display (G_ "
- -L, --list-updaters list available updaters and exit"))
+ --list-updaters list available updaters and exit"))
(display (G_ "
-l, --list-dependent list top-level dependent packages that would need to
be rebuilt as a result of upgrading PACKAGE..."))
@@ -182,7 +172,7 @@ specified with `--select'.\n"))
used when 'key-download' is not specified"))
(newline)
(display (G_ "
- --load-path=DIR prepend DIR to the package module search path"))
+ -L, --load-path=DIR prepend DIR to the package module search path"))
(newline)
(display (G_ "
-h, --help display this help and exit"))