GNU bug report logs -
#43953
[PATCH] guix build: Move package transformation options behind '--help-transform'.
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Mon, 12 Oct 2020 13:25:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43953 in the body.
You can then email your comments to 43953 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#43953
; Package
guix-patches
.
(Mon, 12 Oct 2020 13:25:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 12 Oct 2020 13:25:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This change declutters the '--help' output.
* guix/scripts/build.scm (show-build-options-help)
(%standard-build-options): Add '--help-transform'.
(show-transformation-options-help): Make private.
(show-help): Remove call to 'show-transformation-options-help'.
* guix/scripts/build.scm (show-help): Likewise.
* 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.
* doc/guix.texi (Package Transformation Options): Mention '--help-transform'.
---
doc/guix.texi | 5 +++++
guix/scripts/build.scm | 14 ++++++++++----
guix/scripts/environment.scm | 2 --
guix/scripts/graph.scm | 5 +----
guix/scripts/install.scm | 2 --
guix/scripts/pack.scm | 2 --
guix/scripts/package.scm | 2 --
guix/scripts/upgrade.scm | 2 --
8 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 1885690c81..8044073bea 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9257,6 +9257,11 @@ Package transformation options are preserved across upgrades:
@command{guix upgrade} attempts to apply transformation options
initially used when creating the profile to the upgraded packages.
+The available options are listed below. Most commands support them and
+also support a @option{--help-transform} option that lists all the
+available options and a synopsis (these options are not shown in the
+@option{--help} output for brevity).
+
@table @code
@item --with-source=@var{source}
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 6ca669d172..f4a8af035b 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -65,7 +65,6 @@
%transformation-options
options->transformation
manifest-entry-with-transformations
- show-transformation-options-help
guix-build
register-root
@@ -717,6 +716,8 @@ 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"))
(display (G_ "
-M, --max-jobs=N allow at most N build jobs"))
+ (display (G_ "
+ --help-transform list package transformation options not shown here"))
(display (G_ "
--debug=LEVEL produce debugging output at LEVEL")))
@@ -853,7 +854,14 @@ use '--no-offload' instead~%")))
(if c
(apply values (alist-cons 'max-jobs c result) rest)
(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)))))
;;;
@@ -910,8 +918,6 @@ Build the given PACKAGE-OR-DERIVATION and return their output paths.\n"))
(newline)
(show-build-options-help)
(newline)
- (show-transformation-options-help)
- (newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 085f11a9d4..91ce2af9bb 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -179,8 +179,6 @@ COMMAND or an interactive shell in that environment.\n"))
(newline)
(show-build-options-help)
(newline)
- (show-transformation-options-help)
- (newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index d7a08a4fe1..0d11fc9795 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -35,8 +35,7 @@
#:use-module ((guix diagnostics)
#:select (location-file formatted-message))
#:use-module ((guix scripts build)
- #:select (show-transformation-options-help
- options->transformation
+ #:select (options->transformation
%standard-build-options
%transformation-options))
#:use-module (srfi srfi-1)
@@ -546,8 +545,6 @@ Emit a representation of the dependency graph of PACKAGE...\n"))
(display (G_ "
-L, --load-path=DIR prepend DIR to the package module search path"))
(newline)
- (show-transformation-options-help)
- (newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "
diff --git a/guix/scripts/install.scm b/guix/scripts/install.scm
index 894e60f9da..5aafe3bd6d 100644
--- a/guix/scripts/install.scm
+++ b/guix/scripts/install.scm
@@ -38,8 +38,6 @@ This is an alias for 'guix package -i'.\n"))
(newline)
(show-build-options-help)
(newline)
- (show-transformation-options-help)
- (newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 0b66da01f9..a5a70d5162 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1043,8 +1043,6 @@ last resort for relocation."
Create a bundle of PACKAGE.\n"))
(show-build-options-help)
(newline)
- (show-transformation-options-help)
- (newline)
(display (G_ "
-f, --format=FORMAT build a pack in the given FORMAT"))
(display (G_ "
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 2f04652634..ba62d98682 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -397,8 +397,6 @@ Install, remove, or upgrade packages in a single transaction.\n"))
(newline)
(show-build-options-help)
(newline)
- (show-transformation-options-help)
- (newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "
diff --git a/guix/scripts/upgrade.scm b/guix/scripts/upgrade.scm
index 8c7abd133a..dee7445994 100644
--- a/guix/scripts/upgrade.scm
+++ b/guix/scripts/upgrade.scm
@@ -39,8 +39,6 @@ This is an alias for 'guix package -u'.\n"))
(newline)
(show-build-options-help)
(newline)
- (show-transformation-options-help)
- (newline)
(display (G_ "
-h, --help display this help and exit"))
(display (G_ "
--
2.28.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#43953
; Package
guix-patches
.
(Mon, 19 Oct 2020 11:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 43953 <at> debbugs.gnu.org (full text, mbox):
Hi,
I did a quick test with this, and it LGTM.
I'd only suggest to clarify what should be the commit title for these
changes, as both "guix build:" and "build:" are used.
Happy hacking!
Miguel
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Tue, 20 Oct 2020 14:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
bug acknowledged by developer.
(Tue, 20 Oct 2020 14:39:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 43953-done <at> debbugs.gnu.org (full text, mbox):
Hi!
Ludovic Courtès <ludo <at> gnu.org> skribis:
> This change declutters the '--help' output.
>
> * guix/scripts/build.scm (show-build-options-help)
> (%standard-build-options): Add '--help-transform'.
> (show-transformation-options-help): Make private.
> (show-help): Remove call to 'show-transformation-options-help'.
> * guix/scripts/build.scm (show-help): Likewise.
> * 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.
> * doc/guix.texi (Package Transformation Options): Mention '--help-transform'.
Pushed as 6701f64f7329cdbeda70bcaf38523c9098e5a938.
Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com> skribis:
> I'd only suggest to clarify what should be the commit title for these
> changes, as both "guix build:" and "build:" are used.
“build:” is used for changes to the build system: Makefiles,
configure.ac, etc.
“guix build:” is used for changes to (guix scripts build).
At least that’s my intention. :-)
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 18 Nov 2020 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.