From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WBSSFdklr2KoAgAAbAwnHQ (envelope-from ) for ; Sun, 19 Jun 2022 15:34:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WDtNFdklr2LmKQEAauVa8A (envelope-from ) for ; Sun, 19 Jun 2022 15:34:17 +0200 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 DE69E399D0 for ; Sun, 19 Jun 2022 15:34:14 +0200 (CEST) Received: from localhost ([::1]:41568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2v49-0006M5-NJ for larch@yhetil.org; Sun, 19 Jun 2022 09:34:13 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655645655; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=89TvcG5m2r46HEHGiA3N5HSfaUxuVlC0CUTubu8IlGs=; b=gHYiLxLS+UfTwIqseanvWeN9p3gZ3FACrM/gAxhaXyp7gCvkXm9IB+fBNWjIIYHXE++KpO DQ2BobMwum3I9vbAUn5XmBMPF9TdXhBlJPhJMjsgegHYIMi5zzYZKpM3jt9jU6COKZJRXH AVNm/9sENut9BFWGfhCsRSs3BDzrtkP/lTu1Nwm4i5m9+lJl9GQcFzkdlTdxlGai/ri9qz YCntInOXrphyU/kiWAhkpCNltITDmfnVQ3Ce4n0I1HB2rKct1Hf4INCSViJUBpsrdrU8Ct cyjguAWefNfMfoIRWTzCvF3ez8Lf22O0wBQ5nlcdKCk7gv1rnZ73307B3EFUtw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655645655; a=rsa-sha256; cv=none; b=svMfH/nzipxANDUtOR2hvTAozHQ4aC94/ZREspXhDHS05OcLpw9VsGdGNkvYakF0inLdV9 4yXA1+oCIqNcvjMSV4xXsN0DkXuwDtljIpo0eF+ypyM1PoRh4sXkw4Gwt8zflxgJAunYIx +YIGJVIfx6NzYpfLjJUEKRUc/qs75tsj9eatZkPgztc1Ob70mQR4dUEc5CRHYC4kL31fVO 7/NIiUGNa+kJZLD3HWCw747sWcpVCNoJBJvWqcmrJYKlNRG4xDFtlCB6/tw1i79u7JHfVO 08N2rKzBisnQeVOMGbkRYR1cujIHj/YCy4obPcP7VFY72DjAV2YPIeOZ4W0W/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XR2q6s4+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=XR2q6s4+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DE69E399D0 X-Spam-Score: -1.68 X-Migadu-Scanner: scn0.migadu.com X-TUID: o/KEkcaAEJ7t 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'. 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")) base-commit: 7f208f68dea828fe02718ca8ce81d5975136cff8 -- 2.36.1