From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oH5DEUdZhF+2cQAA0tVLHw (envelope-from ) for ; Mon, 12 Oct 2020 13:25:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aFsWDUdZhF+0fwAAB5/wlQ (envelope-from ) for ; Mon, 12 Oct 2020 13:25:27 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C3A929404CA for ; Mon, 12 Oct 2020 13:25:26 +0000 (UTC) Received: from localhost ([::1]:33284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRxpN-0001xp-4W for larch@yhetil.org; Mon, 12 Oct 2020 09:25:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRxp0-0001vb-Ot for guix-patches@gnu.org; Mon, 12 Oct 2020 09:25:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRxp0-0005ot-Eu for guix-patches@gnu.org; Mon, 12 Oct 2020 09:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kRxp0-0008Op-9x for guix-patches@gnu.org; Mon, 12 Oct 2020 09:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43953] [PATCH] guix build: Move package transformation options behind '--help-transform'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Oct 2020 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43953 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43953@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160250908432250 (code B ref -1); Mon, 12 Oct 2020 13:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Oct 2020 13:24:44 +0000 Received: from localhost ([127.0.0.1]:41951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRxoh-0008O6-KC for submit@debbugs.gnu.org; Mon, 12 Oct 2020 09:24:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:49570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRxod-0008Nu-Pm for submit@debbugs.gnu.org; Mon, 12 Oct 2020 09:24:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRxod-0001f7-Ii for guix-patches@gnu.org; Mon, 12 Oct 2020 09:24:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42652) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRxoc-0005ln-ED; Mon, 12 Oct 2020 09:24:38 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=54748 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kRxob-0005Vw-Rm; Mon, 12 Oct 2020 09:24:38 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 12 Oct 2020 15:24:31 +0200 Message-Id: <20201012132431.21240-1-ludo@gnu.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.49 X-TUID: RgNfhf5blWR0 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