From unknown Sat Jun 21 03:24:53 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#52586 <52586@debbugs.gnu.org> To: bug#52586 <52586@debbugs.gnu.org> Subject: Status: [PATCH] import: elpa: Support =?UTF-8?Q?=E2=80=98upstream-name=E2=80=99?= property. Reply-To: bug#52586 <52586@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:24:53 +0000 retitle 52586 [PATCH] import: elpa: Support =E2=80=98upstream-name=E2=80=99= property. reassign 52586 guix-patches submitter 52586 Xinglu Chen severity 52586 normal tag 52586 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 17 15:56:13 2021 Received: (at submit) by debbugs.gnu.org; 17 Dec 2021 20:56:13 +0000 Received: from localhost ([127.0.0.1]:40707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myKGz-0006Qg-6u for submit@debbugs.gnu.org; Fri, 17 Dec 2021 15:56:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:39996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myKGx-0006QY-Oe for submit@debbugs.gnu.org; Fri, 17 Dec 2021 15:56:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myKGw-0005Cf-I5 for guix-patches@gnu.org; Fri, 17 Dec 2021 15:56:11 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:58454 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myKGq-0002oy-Gf for guix-patches@gnu.org; Fri, 17 Dec 2021 15:56:09 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1639774555; bh=YBkfoEouK/cJiKlbJR9uo5E35ud97jDsNVaCuoUFPLM=; h=From:To:Subject:Date; b=pjU0AzBlB42u66JUYQS+XPvWEJhvcTVppoPz2NTW/sNxWqP3eoSoh1ogmg7z7sMsz ZF2a/FnoqRMcyCw4hMBbBhvR4USqI3cZoB3k7yDLRx6D2LFxNa15sGg1zmihBGTgAv lNPSYj+YNOWFQOsY8EmBJbC3Inarba/wWbDcdiTk= To: guix-patches@gnu.org Subject: [PATCH] =?UTF-8?q?import:=20elpa:=20Support=20=E2=80=98upstream-n?= =?UTF-8?q?ame=E2=80=99=20property.?= Message-Id: Date: Fri, 17 Dec 2021 21:55:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 53 X-Spam_score: 5.3 X-Spam_bar: +++++ X-Spam_report: (5.3 / 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, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=0.295, PDS_OTHER_BAD_TLD=1.997, PDS_RDNS_DYNAMIC_FP=0.001, RCVD_IN_PBL=3.335, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=0.245 autolearn=no autolearn_force=no X-Spam_action: reject X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/import/elpa.scm: (guix-package->elpa-name): New procedure. (latest-release): Use it. * tests/elpa.scm ("guix-package->elpa-name: without 'upstream-name' property") ("guix-package->elpa-name: wi [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.51.188.17 listed in wl.mailspike.net] 0.5 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: submit 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: (guix-package->elpa-name): New procedure. (latest-release): Use it. * tests/elpa.scm ("guix-package->elpa-name: without 'upstream-name' propert= y") ("guix-package->elpa-name: with 'upstream-name' property"): Test it. --- guix/import/elpa.scm | 15 ++++++++++----- tests/elpa.scm | 12 ++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index dd539cd945..edabb88b7a 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -46,6 +46,7 @@ (define-module (guix import elpa) #:use-module (guix packages) #:use-module ((guix utils) #:select (call-with-temporary-output-file)) #:export (elpa->guix-package + guix-package->elpa-name %elpa-updater elpa-recursive-import)) =20 @@ -412,13 +413,17 @@ (define* (elpa->guix-package name #:key (repo 'gnu) v= ersion) ;;; Updates. ;;; =20 +(define (guix-package->elpa-name package) + "Given a Guix package, PACKAGE, return the upstream name on ELPA." + (or (and=3D> (package-properties package) + (cut assq-ref <> 'upstream-name)) + (if (string-prefix? "emacs-" (package-name package)) + (string-drop (package-name package) 6) + (package-name package)))) + (define (latest-release package) "Return an for the latest release of PACKAGE." - (define name - (if (string-prefix? "emacs-" (package-name package)) - (string-drop (package-name package) 6) - (package-name package))) - + (define name (guix-package->elpa-name package)) (define repo 'gnu) =20 (match (elpa-package-info name repo) diff --git a/tests/elpa.scm b/tests/elpa.scm index 01ef948b2e..1efdf2457f 100644 --- a/tests/elpa.scm +++ b/tests/elpa.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2015 Federico Beffa ;;; Copyright =C2=A9 2020 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2020 Martin Becze +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ =20 (define-module (test-elpa) #:use-module (guix import elpa) + #:use-module (guix tests) #:use-module (guix tests http) #:use-module (srfi srfi-1) #:use-module (srfi srfi-64) @@ -71,6 +73,16 @@ (define (eval-test-with-elpa pkg) (test-assert "elpa->guix-package test 1" (eval-test-with-elpa "auctex")) =20 +(test-equal "guix-package->elpa-name: without 'upstream-name' property" + "auctex" + (guix-package->elpa-name (dummy-package "emacs-auctex"))) + +(test-equal "guix-package->elpa-name: with 'upstream-name' property" + "project" + (guix-package->elpa-name + (dummy-package "emacs-fake-name" + (properties '((upstream-name . "project")))))) + (test-end "elpa") =20 ;; Local Variables: base-commit: d627fbad8f4e157103251b07d7543dd2f5647cea --=20 2.33.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 18 15:00:48 2021 Received: (at 52586-done) by debbugs.gnu.org; 18 Dec 2021 20:00:49 +0000 Received: from localhost ([127.0.0.1]:43901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myfsu-00015R-NM for submit@debbugs.gnu.org; Sat, 18 Dec 2021 15:00:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myfss-00015A-Jo for 52586-done@debbugs.gnu.org; Sat, 18 Dec 2021 15:00:47 -0500 Received: from [2001:470:142:3::e] (port=37620 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myfsi-0008Mr-Uu; Sat, 18 Dec 2021 15:00:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=pTecdjS1+Db/IMlYC2BIZRkZubZRwMtjQR07zGG1pKc=; b=VZH8ANLsJHzJtrw0JJON ZoW3gSRQPl/8wTjr0NUU2qZC7zsJh2tjHskxQ9smspWK2Q5nyzx4YPM+I2YbF3QvWMk6kyXwqWVCF JTWAnjpKRvhZjrELbECX35cCbHORXHhSfAGVwm32vbSuG8fBSRN0tOByFfkfA5yB0QzKv0b9akehR KAk3X/Wfzpsn5bEJhlrt8Icey8htxZe02aIm0r16KljNCK+qkjUZ03z2fAws5Lw+n08JQ9gFsNYJO O1kOcI/8gVYhEqfFoP8JO1Ewtd5o/u71fzPdzYt5lfcfAAMPvTJoCbBKhEaOsuGg2vUp47/ug6YU3 mdwXP3nQI2Z80g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60256 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myfsi-00050N-Iw; Sat, 18 Dec 2021 15:00:37 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: bug#52586: [PATCH] import: elpa: Support =?utf-8?Q?=E2=80=98u?= =?utf-8?Q?pstream-name=E2=80=99?= property. References: Date: Sat, 18 Dec 2021 21:00:34 +0100 In-Reply-To: (Xinglu Chen's message of "Fri, 17 Dec 2021 21:55:54 +0100") Message-ID: <87ee69of8d.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 52586-done Cc: 52586-done@debbugs.gnu.org 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.3 (-) Hi, Xinglu Chen skribis: > * guix/import/elpa.scm: (guix-package->elpa-name): New procedure. > (latest-release): Use it. > * tests/elpa.scm ("guix-package->elpa-name: without 'upstream-name' prope= rty") > ("guix-package->elpa-name: with 'upstream-name' property"): Test it. Applied, thanks! Ludo=E2=80=99. From unknown Sat Jun 21 03:24:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 16 Jan 2022 12:24:09 +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