transformations: Show '--help-transform' only where applicable.
Fixes <https://bugs.gnu.org/44773>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.
This fixes a regression introduced in
6701f64f73
.
* guix/transformations.scm (%transformation-options): Add
"--help-transform".
(show-transformation-options-help): Rename to...
(show-transformation-options-help/detailed): ... this.
(show-transformation-options-help): New public procedure.
* guix/scripts/build.scm (show-build-options-help): Remove
"--help-transform".
(%standard-build-options): Likewise.
(show-help): Call 'show-transformation-options-help'.
* guix/scripts/environment.scm (show-help): Likewise.
* guix/scripts/graph.scm (show-help): Likewise.
* guix/scripts/install.scm (show-help): Likewise.
* guix/scripts/pack.scm (show-help): Likewise.
* guix/scripts/package.scm (show-help): Likewise.
* guix/scripts/upgrade.scm (show-help): Likewise.
master
parent
0a47ff9f9f
commit
5b3904116f
|
@ -181,8 +181,6 @@ options handled by 'set-build-options-from-command-line', and listed in
|
||||||
-c, --cores=N allow the use of up to N CPU cores for the build"))
|
-c, --cores=N allow the use of up to N CPU cores for the build"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-M, --max-jobs=N allow at most N build jobs"))
|
-M, --max-jobs=N allow at most N build jobs"))
|
||||||
(display (G_ "
|
|
||||||
--help-transform list package transformation options not shown here"))
|
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
--debug=LEVEL produce debugging output at LEVEL")))
|
--debug=LEVEL produce debugging output at LEVEL")))
|
||||||
|
|
||||||
|
@ -319,14 +317,7 @@ use '--no-offload' instead~%")))
|
||||||
(if c
|
(if c
|
||||||
(apply values (alist-cons 'max-jobs c result) rest)
|
(apply values (alist-cons 'max-jobs c result) rest)
|
||||||
(leave (G_ "not a number: '~a' option argument: ~a~%")
|
(leave (G_ "not a number: '~a' option argument: ~a~%")
|
||||||
name arg)))))
|
name arg)))))))
|
||||||
(option '("help-transform") #f #f
|
|
||||||
(lambda _
|
|
||||||
(format #t
|
|
||||||
(G_ "Available package transformation options:~%"))
|
|
||||||
(show-transformation-options-help)
|
|
||||||
(newline)
|
|
||||||
(exit 0)))))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
@ -383,6 +374,8 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
|
||||||
(newline)
|
(newline)
|
||||||
(show-build-options-help)
|
(show-build-options-help)
|
||||||
(newline)
|
(newline)
|
||||||
|
(show-transformation-options-help)
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
|
@ -180,6 +180,8 @@ COMMAND or an interactive shell in that environment.\n"))
|
||||||
(newline)
|
(newline)
|
||||||
(show-build-options-help)
|
(show-build-options-help)
|
||||||
(newline)
|
(newline)
|
||||||
|
(show-transformation-options-help)
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
|
@ -35,7 +35,8 @@
|
||||||
#:use-module ((guix diagnostics)
|
#:use-module ((guix diagnostics)
|
||||||
#:select (location-file formatted-message))
|
#:select (location-file formatted-message))
|
||||||
#:use-module ((guix transformations)
|
#:use-module ((guix transformations)
|
||||||
#:select (options->transformation
|
#:select (show-transformation-options-help
|
||||||
|
options->transformation
|
||||||
%transformation-options))
|
%transformation-options))
|
||||||
#:use-module ((guix scripts build)
|
#:use-module ((guix scripts build)
|
||||||
#:select (%standard-build-options))
|
#:select (%standard-build-options))
|
||||||
|
@ -546,6 +547,8 @@ Emit a representation of the dependency graph of PACKAGE...\n"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-L, --load-path=DIR prepend DIR to the package module search path"))
|
-L, --load-path=DIR prepend DIR to the package module search path"))
|
||||||
(newline)
|
(newline)
|
||||||
|
(show-transformation-options-help)
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
|
@ -39,6 +39,8 @@ This is an alias for 'guix package -i'.\n"))
|
||||||
(newline)
|
(newline)
|
||||||
(show-build-options-help)
|
(show-build-options-help)
|
||||||
(newline)
|
(newline)
|
||||||
|
(show-transformation-options-help)
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
|
@ -1067,6 +1067,8 @@ last resort for relocation."
|
||||||
Create a bundle of PACKAGE.\n"))
|
Create a bundle of PACKAGE.\n"))
|
||||||
(show-build-options-help)
|
(show-build-options-help)
|
||||||
(newline)
|
(newline)
|
||||||
|
(show-transformation-options-help)
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-f, --format=FORMAT build a pack in the given FORMAT"))
|
-f, --format=FORMAT build a pack in the given FORMAT"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
|
@ -398,6 +398,8 @@ Install, remove, or upgrade packages in a single transaction.\n"))
|
||||||
(newline)
|
(newline)
|
||||||
(show-build-options-help)
|
(show-build-options-help)
|
||||||
(newline)
|
(newline)
|
||||||
|
(show-transformation-options-help)
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
|
@ -42,6 +42,8 @@ This is an alias for 'guix package -u'.\n"))
|
||||||
(newline)
|
(newline)
|
||||||
(show-build-options-help)
|
(show-build-options-help)
|
||||||
(newline)
|
(newline)
|
||||||
|
(show-transformation-options-help)
|
||||||
|
(newline)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
|
|
|
@ -508,9 +508,17 @@ to the same package but with #:strip-binaries? #f in its 'arguments' field."
|
||||||
(option '("with-debug-info") #t #f
|
(option '("with-debug-info") #t #f
|
||||||
(parser 'with-debug-info))
|
(parser 'with-debug-info))
|
||||||
(option '("without-tests") #t #f
|
(option '("without-tests") #t #f
|
||||||
(parser 'without-tests)))))
|
(parser 'without-tests))
|
||||||
|
|
||||||
(define (show-transformation-options-help)
|
(option '("help-transform") #f #f
|
||||||
|
(lambda _
|
||||||
|
(format #t
|
||||||
|
(G_ "Available package transformation options:~%"))
|
||||||
|
(show-transformation-options-help/detailed)
|
||||||
|
(newline)
|
||||||
|
(exit 0))))))
|
||||||
|
|
||||||
|
(define (show-transformation-options-help/detailed)
|
||||||
(display (G_ "
|
(display (G_ "
|
||||||
--with-source=[PACKAGE=]SOURCE
|
--with-source=[PACKAGE=]SOURCE
|
||||||
use SOURCE when building the corresponding package"))
|
use SOURCE when building the corresponding package"))
|
||||||
|
@ -539,6 +547,10 @@ to the same package but with #:strip-binaries? #f in its 'arguments' field."
|
||||||
--without-tests=PACKAGE
|
--without-tests=PACKAGE
|
||||||
build PACKAGE without running its tests")))
|
build PACKAGE without running its tests")))
|
||||||
|
|
||||||
|
(define (show-transformation-options-help)
|
||||||
|
"Show basic help for package transformation options."
|
||||||
|
(display (G_ "
|
||||||
|
--help-transform list package transformation options not shown here")))
|
||||||
|
|
||||||
(define (options->transformation opts)
|
(define (options->transformation opts)
|
||||||
"Return a procedure that, when passed an object to build (package,
|
"Return a procedure that, when passed an object to build (package,
|
||||||
|
|
Reference in New Issue