From patchwork Sun Jun 19 13:33:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 40154 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D408827BBEA; Sun, 19 Jun 2022 14:34:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 36C6B27BBE9 for ; Sun, 19 Jun 2022 14:34:19 +0100 (BST) Received: from localhost ([::1]:41568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2v4E-0006M5-Bm for patchwork@mira.cbaines.net; Sun, 19 Jun 2022 09:34:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2v3z-0006JR-8R for guix-patches@gnu.org; Sun, 19 Jun 2022 09:34:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2v3y-00089Y-Gi for guix-patches@gnu.org; Sun, 19 Jun 2022 09:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2v3y-0005nq-Dw for guix-patches@gnu.org; Sun, 19 Jun 2022 09:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56089] [PATCH] refresh: Repurpose '-L' for '--load-path'. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Jun 2022 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56089 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56089@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.165564560422244 (code B ref -1); Sun, 19 Jun 2022 13:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jun 2022 13:33:24 +0000 Received: from localhost ([127.0.0.1]:50918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2v3M-0005mh-4G for submit@debbugs.gnu.org; Sun, 19 Jun 2022 09:33:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:47896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2v3K-0005mZ-GL for submit@debbugs.gnu.org; Sun, 19 Jun 2022 09:33:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2v3K-0005XR-9h for guix-patches@gnu.org; Sun, 19 Jun 2022 09:33:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2v3K-00084T-1H; Sun, 19 Jun 2022 09:33:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=89TvcG5m2r46HEHGiA3N5HSfaUxuVlC0CUTubu8IlGs=; b=XR2q6s4+7rcmT8 9UVlJNazDHcjyDHCWk3+GKYTrr+SragGoW2xzVqqjECJXl8QHcvTs4a0ufGYfvgx45COc9vjLW7n4 JGDtlNLLNuWRJkpbHs/sfzJ9V2mF880PJn6NY3gmTW8Nm7kdjQn8NmvgH4DzNpUS8asywQXA8cWE5 eWlymZ8oY9nZq64srLhlSBvwf8NbYsgTqnvC5wFMthPvPg4x46quI88KQaBnxLeDo8PRNfY6A8GhX QBqXr+6jsX1YuxhLpDoXCzCDafwQ8O+1j+Yj9tW4gIZpkusJFCGAOoLHyLlQqj4g8PcmESrN/RrAt utYH49fDWyOwDZjtA9wQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54779 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2v3J-0002kt-Kx; Sun, 19 Jun 2022 09:33:21 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sun, 19 Jun 2022 15:33:13 +0200 Message-Id: <20220619133313.2271-1-ludo@gnu.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. --- doc/guix.texi | 2 +- guix/scripts/refresh.scm | 22 ++++++---------------- 2 files changed, 7 insertions(+), 17 deletions(-) Hi! This patch fixes a CLI inconsistency. It introduces an incompatibility, but one that's probably acceptable: '--list-updaters' is rarely used. Commit 21f4fbdd8453e489fb89825c4226a0a0bda2bc17 purposefully introduced '--load-path' without the '-L' shorthand; in hindsight, reclaiming '-L' for '--load-path' sounds preferable to me. Objections? Ludo'. base-commit: 7f208f68dea828fe02718ca8ce81d5975136cff8 diff --git a/doc/guix.texi b/doc/guix.texi index 86348fc02c..43b550311d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13715,7 +13715,6 @@ gnu/packages/emacs.scm:856:13: emacs-auctex would be upgraded from 11.88.6 to 11 @end example @item --list-updaters -@itemx -L List available updaters and exit (see @option{--type} above). For each updater, display the fraction of packages it covers; at the @@ -13846,6 +13845,7 @@ the user whether to download it or not. This is the default behavior. Use @var{host} as the OpenPGP key server when importing a public key. @item --load-path=@var{directory} +@itemx -L @var{directory} Add @var{directory} to the front of the package module search path (@pxref{Package Modules}). 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 @@ (define %options (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 @@ (define %options (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 @@ (define (show-help) -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 @@ (define (show-help) 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"))