From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 16 12:42:56 2025 Received: (at submit) by debbugs.gnu.org; 16 Apr 2025 16:42:56 +0000 Received: from localhost ([127.0.0.1]:41063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u55qh-0004Bt-P9 for submit@debbugs.gnu.org; Wed, 16 Apr 2025 12:42:56 -0400 Received: from lists.gnu.org ([2001:470:142::17]:60462) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u55qb-00048V-8y for submit@debbugs.gnu.org; Wed, 16 Apr 2025 12:42:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u55qI-0000Wm-4F for guix-patches@gnu.org; Wed, 16 Apr 2025 12:42:33 -0400 Received: from mx1.dismail.de ([78.46.223.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u55qE-0007yR-Hv for guix-patches@gnu.org; Wed, 16 Apr 2025 12:42:28 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 8c757e0f for ; Wed, 16 Apr 2025 18:42:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=Y5R76akGDTqfWdmEunClC HN0jJdvVBQewebgL0/X/SI=; b=ubqvat1fxUC1zBCCxCOpQyd+jMkXLtrM2+w5p pGMQppRd1wYr+W2pTCyEwCSJxs661v9dSQqKPu86wBLPGoNFGzPHw8tsafk6NW2W osiOrkezpCb8xJuwlRQfTrq+sn9sObrmChWRqBxgXqBEvGLvjTQ5TWF2FIuOihOd YQ8NhJ6lv3tokULD6dv+1P/x2G0gisJHydbH0ldDm8XiOQIcd8FrUteKrCec8ooa +Zm2ggGHaumnxeDgi6uHIDM7HBkY5GAxWTy5EH7NEO9AteTFcvOHlkre8WNnvw/I xgDbMDZcJcdBzRuZwFFw5sIHhG5ZtTEr5yi7VZm6v66sv7Ahw== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 8b19037c for ; Wed, 16 Apr 2025 18:42:20 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id f1a1a78e for ; Wed, 16 Apr 2025 18:42:20 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 60c5976e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 16 Apr 2025 18:42:19 +0200 (CEST) From: jgart To: guix-patches@gnu.org Subject: [PATCH] import/elpa: Improve CLI documentation for archive flag. Date: Wed, 16 Apr 2025 11:41:50 -0500 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Debbugs-Cc: Andrew Tropin , Cayetano Santos , Christopher Baines , Divya Ranjan Pattanaik , Hilton Chain , Ian Eure , Josselin Poiret , Katherine Cox-Buday , Liliana Marie Prikler , Ludovic Courtès , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=78.46.223.134; envelope-from=jgart@dismail.de; helo=mx1.dismail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: jgart X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) * guix/import/elpa.scm (%elpa-archives): Add new global variable listing the elpa archives. * guix/scripts/import/elpa.scm: Use %elpa-archives in CLI documentation and reference it from the archives list in the default options global variable. Change-Id: Ib686bd9ff5eff2d4c37b8751ec1410666d568c1f --- guix/import/elpa.scm | 17 ++++++++++------- guix/scripts/import/elpa.scm | 10 +++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index ea16885d90..eda3d6d60b 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2022 Hartmut Goebel +;;; Copyright © 2025 jgart ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,6 +52,7 @@ (define-module (guix import elpa) #:use-module (guix memoization) #:export (elpa->guix-package guix-package->elpa-name + %elpa-archives %elpa-updater elpa-recursive-import)) @@ -81,15 +83,16 @@ (define (elpa-name->package-name name) (string-downcase name) (string-append package-name-prefix (string-downcase name))))) +(define %elpa-archives + '((gnu . "https://elpa.gnu.org/packages") + (gnu/http . "http://elpa.gnu.org/packages") ;for testing + (nongnu . "https://elpa.nongnu.org/nongnu") + (melpa-stable . "https://stable.melpa.org/packages") + (melpa . "https://melpa.org/packages"))) + (define* (elpa-url #:optional (repo 'gnu)) "Retrieve the URL of REPO." - (let ((elpa-archives - '((gnu . "https://elpa.gnu.org/packages") - (gnu/http . "http://elpa.gnu.org/packages") ;for testing - (nongnu . "https://elpa.nongnu.org/nongnu") - (melpa-stable . "https://stable.melpa.org/packages") - (melpa . "https://melpa.org/packages")))) - (assq-ref elpa-archives repo))) + (assq-ref %elpa-archives repo)) (define* (elpa-fetch-archive #:optional (repo 'gnu)) "Retrieve the archive with the list of packages available from REPO." diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm index 7f77beaac0..be15b5d60e 100644 --- a/guix/scripts/import/elpa.scm +++ b/guix/scripts/import/elpa.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2023 Simon Tournier +;;; Copyright © 2025 jgart ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,13 +41,16 @@ (define-module (guix scripts import elpa) ;;; (define %default-options - '((repo . gnu))) + `((repo . ,(assq-ref %elpa-archives 'gnu)))) (define (show-help) (display (G_ "Usage: guix import elpa PACKAGE-NAME Import the latest package named PACKAGE-NAME from an ELPA repository.\n")) - (display (G_ " - -a, --archive=ARCHIVE specify the archive repository")) + (display + (format #f + (G_ " + -a, --archive=ARCHIVE archive repository must be one of ~{~a ~}") + (map first %elpa-archives))) (display (G_ " -h, --help display this help and exit")) (display (G_ " base-commit: c2af5487988b57ba80edb45f75a39152f8c49745 -- 2.49.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 16 13:03:16 2025 Received: (at 77844-done) by debbugs.gnu.org; 16 Apr 2025 17:03:16 +0000 Received: from localhost ([127.0.0.1]:41203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u56AJ-0006r6-EO for submit@debbugs.gnu.org; Wed, 16 Apr 2025 13:03:16 -0400 Received: from mx1.dismail.de ([78.46.223.134]:9820) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u56AB-0006oH-AK for 77844-done@debbugs.gnu.org; Wed, 16 Apr 2025 13:03:08 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 1511ce2a for <77844-done@debbugs.gnu.org>; Wed, 16 Apr 2025 19:02:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:in-reply-to:date:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=v1uw1VTBkVAW0KEmFdZvc LG+p5fbr2h9Hhtrh/VF4Zw=; b=XlYGxc1ZADgja/XI0rN2twXVxqWNPDvtwCnuj Jxb7fAKvH7c8G/IbQYfQlYtMKmUZm11/YGupEkygLQK36/RHpgUYAOpPYifXxQZj QsLzd8DOYMoR5S6B2zksQFvSuR7SAO9ndpNSPuPnQm1OdJtUNHPcMEDkb/LqsNuH mu36HKonZJTLHyj7cb7/ibVPbYwFIXNmHkSnLwz3iNXGqVL8vOaieOLQBLLekfyy q4M1YXxLtMzH052kmzgHUPLa6AiAT09+XOR+Yi4EX12xdc2mmSQ3YvS0j3i+X1KR C2k+sqaIo6ROR2JvNdEfSB5Q2qK3yFs1YHFkGcHqnXY1NmyIQ== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id b9cc5377 for <77844-done@debbugs.gnu.org>; Wed, 16 Apr 2025 19:02:55 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 45496655 for <77844-done@debbugs.gnu.org>; Wed, 16 Apr 2025 19:02:55 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 12ae8636 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 16 Apr 2025 19:02:54 +0200 (CEST) From: jgart To: 77844-done@debbugs.gnu.org Subject: Re: [PATCH] import/elpa: Improve CLI documentation for archive flag. In-Reply-To: Date: Wed, 16 Apr 2025 12:02:51 -0500 Message-ID: <87jz7kvy2s.fsf@unknownee2179f0a061.attlocal.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77844-done Cc: jgart X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, This has been superseded by 77845. Closing, jgart > * guix/import/elpa.scm (%elpa-archives): Add new global variable listing = the > elpa archives. > * guix/scripts/import/elpa.scm: Use %elpa-archives in CLI documentation a= nd > reference it from the archives list in the default options global variabl= e. >=20 > Change-Id: Ib686bd9ff5eff2d4c37b8751ec1410666d568c1f > --- > guix/import/elpa.scm | 17 ++++++++++------- > guix/scripts/import/elpa.scm | 10 +++++++--- > 2 files changed, 17 insertions(+), 10 deletions(-) >=20 > diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm > index ea16885d90..eda3d6d60b 100644 > --- a/guix/import/elpa.scm > +++ b/guix/import/elpa.scm > @@ -8,6 +8,7 @@ > ;;; Copyright =C2=A9 2021 Sarah Morgensen > ;;; Copyright =C2=A9 2021 Simon Tournier > ;;; Copyright =C2=A9 2022 Hartmut Goebel > +;;; Copyright =C2=A9 2025 jgart > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -51,6 +52,7 @@ (define-module (guix import elpa) > #:use-module (guix memoization) > #:export (elpa->guix-package > guix-package->elpa-name > + %elpa-archives > %elpa-updater > elpa-recursive-import)) >=20=20 > @@ -81,15 +83,16 @@ (define (elpa-name->package-name name) > (string-downcase name) > (string-append package-name-prefix (string-downcase name))))) >=20=20 > +(define %elpa-archives > + '((gnu . "https://elpa.gnu.org/packages") > + (gnu/http . "http://elpa.gnu.org/packages") ;for testing > + (nongnu . "https://elpa.nongnu.org/nongnu") > + (melpa-stable . "https://stable.melpa.org/packages") > + (melpa . "https://melpa.org/packages"))) > + > (define* (elpa-url #:optional (repo 'gnu)) > "Retrieve the URL of REPO." > - (let ((elpa-archives > - '((gnu . "https://elpa.gnu.org/packages") > - (gnu/http . "http://elpa.gnu.org/packages") ;for testing > - (nongnu . "https://elpa.nongnu.org/nongnu") > - (melpa-stable . "https://stable.melpa.org/packages") > - (melpa . "https://melpa.org/packages")))) > - (assq-ref elpa-archives repo))) > + (assq-ref %elpa-archives repo)) >=20=20 > (define* (elpa-fetch-archive #:optional (repo 'gnu)) > "Retrieve the archive with the list of packages available from REPO." > diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm > index 7f77beaac0..be15b5d60e 100644 > --- a/guix/scripts/import/elpa.scm > +++ b/guix/scripts/import/elpa.scm > @@ -4,6 +4,7 @@ > ;;; Copyright =C2=A9 2020 Martin Becze > ;;; Copyright =C2=A9 2021 Sarah Morgensen > ;;; Copyright =C2=A9 2023 Simon Tournier > +;;; Copyright =C2=A9 2025 jgart > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -40,13 +41,16 @@ (define-module (guix scripts import elpa) > ;;; >=20=20 > (define %default-options > - '((repo . gnu))) > + `((repo . ,(assq-ref %elpa-archives 'gnu)))) >=20=20 > (define (show-help) > (display (G_ "Usage: guix import elpa PACKAGE-NAME > Import the latest package named PACKAGE-NAME from an ELPA repository.\n"= )) > - (display (G_ " > - -a, --archive=3DARCHIVE specify the archive repository")) > + (display > + (format #f > + (G_ " > + -a, --archive=3DARCHIVE archive repository must be one of ~{~= a ~}") > + (map first %elpa-archives))) > (display (G_ " > -h, --help display this help and exit")) > (display (G_ " >=20 > base-commit: c2af5487988b57ba80edb45f75a39152f8c49745 > --=20 > 2.49.0 <#secure method=3Dpgpmime mode=3Dsign> --=20 all the best, jgart From unknown Sun Jun 15 08:39:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 15 May 2025 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator