From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4C2LFnMrx2GcEQEAgWs5BA (envelope-from ) for ; Sat, 25 Dec 2021 15:32:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wJ0wEnMrx2GrGgAA1q6Kng (envelope-from ) for ; Sat, 25 Dec 2021 14:32:19 +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 B0A5A24C54 for ; Sat, 25 Dec 2021 15:32:17 +0100 (CET) Received: from localhost ([::1]:48100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n185o-00008g-Sg for larch@yhetil.org; Sat, 25 Dec 2021 09:32:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n185b-00005J-2C for guix-patches@gnu.org; Sat, 25 Dec 2021 09:32:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n185a-0006wU-Ob for guix-patches@gnu.org; Sat, 25 Dec 2021 09:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n185a-0002L5-MW for guix-patches@gnu.org; Sat, 25 Dec 2021 09:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52774] [PATCH] import: elpa: Also check NonGNU ELPA for updates. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Dec 2021 14:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52774 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler , 52774@debbugs.gnu.org Received: via spool by 52774-submit@debbugs.gnu.org id=B52774.16404427108958 (code B ref 52774); Sat, 25 Dec 2021 14:32:02 +0000 Received: (at 52774) by debbugs.gnu.org; 25 Dec 2021 14:31:50 +0000 Received: from localhost ([127.0.0.1]:38705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n185N-0002KP-Pe for submit@debbugs.gnu.org; Sat, 25 Dec 2021 09:31:50 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:52674 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n185K-0002Ju-Rz for 52774@debbugs.gnu.org; Sat, 25 Dec 2021 09:31:47 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoctocell.xyz; s=mail; t=1640442698; bh=N5aVfv5aujHvZM4ahLtXOr2NvghjZW0zfubhe54ZdFI=; h=From:To:Subject:In-Reply-To:References:Date; b=FadECNQDZfUo/9E45HAQaOdURxA5nvL8P2wL69wv8gwK+j89BTzHnjUaksL1d9bdg o6q8ipdQEPhlR7+xfhDuduIknuMWJ7Z4s9hOZoQP/FJhAIiZVTBKBE7+/Pwfr2043I wJkxNzsYUGoW3yfDARihTw+gVnbEIcE4+KOwO3cc= In-Reply-To: <0da0a9c2b0f6165712f0a81aab157833a79aecfc.camel@gmail.com> References: <87wnjub5y6.fsf@yoctocell.xyz> <76a91a888e6d4df4d46aa4dcc0fc3719c91e4c39.camel@gmail.com> <87r1a1auic.fsf@yoctocell.xyz> <0da0a9c2b0f6165712f0a81aab157833a79aecfc.camel@gmail.com> Date: Sat, 25 Dec 2021 15:31:37 +0100 Message-ID: <87mtkobvsm.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640442739; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=N5aVfv5aujHvZM4ahLtXOr2NvghjZW0zfubhe54ZdFI=; b=Vx5upBGgAwqE2ukqIe/Woil51v91ZH16q1IkBL65g+pEUBNWdLRqOzGgN41X+mhARnCcLr 0tqZZpo7o77MDoTGJZVkU8gDW2fA41FeuC9Wsi8RaXV8dtuZ2zIRi3MAhyR4cswKv5gk4l LMHR8SmUMI1bv/4+8dEGWOqtOErWTDgohKKZtTRL2ianHwbl3MiiUfsTTRc+9Lquk95i2r 9nBBBnn0zFJDjxuNe1WAjzcjh9e0ksGOWuNkHSln7E7m0vR45eaQS6qL+sTtkuWGMA9nkm Uz4zG/6QGLzTGEkrZ6vRCjaCJZJYpv2euynj0nMQKjycW56iSPEA8oa0nhXfgA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640442739; a=rsa-sha256; cv=none; b=Y8AO5WPLv2PPJPTeq+UKyCMC5J0qcZw8Z6hECK39KT/t43woghcRPxFrjGTzHoza8srhnb 9lXR0KznqtDcJMWBnBoOKLqZuhHwmkskqLiDKCYbvPPTi1h4DNfX1IkeZpYT0xYumb9a0M AZ3mNMFKm/DFD9wXsz0vSDL7ar44gg+GLsICRf7sqm1DmBroHFKcXRhnhF1Dnpm+wGCFGN VuV/Y0KLR1ZYWpvxK457sqnxfMErZ3WeeSAScokWcN3uXSRy7O8soL2irTyHGkSckEwxhy 1N46W0krcNG8OYniJnNFF3H8kei7VXtM2SDAtZ9P9KdGEKHSLtC1Tmz+VjgdGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=FadECNQD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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: -4.56 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=FadECNQD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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: B0A5A24C54 X-Spam-Score: -4.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: BS/lSPFsP7K5 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Liliana schrieb am Samstag der 25. Dezember 2021 um 11:15 +01: > Am Samstag, dem 25.12.2021 um 10:44 +0100 schrieb Xinglu Chen: >> Liliana schrieb am Freitag der 24. Dezember 2021 um 13:17 +01: >>=20 >> > Am Freitag, dem 24.12.2021 um 12:25 +0100 schrieb Xinglu Chen: >> > > * elpa.scm (latest-release): Determine the repository based on >> > > the URL of the source. >> > > (package-from-gnu.org?): Rename to ... >> > > (package-from-gnu.org-or-nongnu.org?): ...this. >> > > (%elpa-updater): Adjust accordingly. >> > > --- >> > > =C2=A0guix/import/elpa.scm | 13 +++++++++---- >> > > =C2=A01 file changed, 9 insertions(+), 4 deletions(-) >> > >=20 >> > > diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm >> > > index edabb88b7a..038379e01b 100644 >> > > --- a/guix/import/elpa.scm >> > > +++ b/guix/import/elpa.scm >> > > @@ -424,7 +424,11 @@ (define (guix-package->elpa-name package) >> > > =C2=A0(define (latest-release package) >> > > =C2=A0=C2=A0 "Return an for the latest release of >> > > PACKAGE." >> > > =C2=A0=C2=A0 (define name (guix-package->elpa-name package)) >> > > -=C2=A0 (define repo 'gnu) >> > > +=C2=A0 (define repo >> > > +=C2=A0=C2=A0=C2=A0 (let ((url (origin-uri (package-source package))= )) >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (if (string-prefix? "https://elpa.no= ngnu.org" url) >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'nongnu >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'gnu))) >> > > =C2=A0 >> > > =C2=A0=C2=A0 (match (elpa-package-info name repo) >> > > =C2=A0=C2=A0=C2=A0=C2=A0 (#f >> > > @@ -443,11 +447,12 @@ (define repo 'gnu) >> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (urls (list url)) >> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (signature-urls (li= st (string-append url ".sig")))))))) >> > > =C2=A0 >> > > -(define package-from-gnu.org? >> > > +(define package-from-gnu.org-or-nongnu.org? >> > > =C2=A0=C2=A0 (url-predicate (lambda (url) >> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let ((uri (string->uri ur= l))) >> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (and uri >> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (string=3D? (uri-host uri) >> > > "elpa.gnu.org")))))) >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (or (string=3D? (uri-host uri) >> > > "elpa.gnu.org") >> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string=3D? (uri-host uri) >> > > "elpa.nongnu.org"))))))) >> > > =C2=A0 >> > > =C2=A0(define %elpa-updater >> > > =C2=A0=C2=A0 ;; The ELPA updater.=C2=A0 We restrict it to packages h= osted on >> > > elpa.gnu.org >> > > @@ -455,7 +460,7 @@ (define %elpa-updater >> > > =C2=A0=C2=A0 (upstream-updater >> > > =C2=A0=C2=A0=C2=A0 (name 'elpa) >> > > =C2=A0=C2=A0=C2=A0 (description "Updater for ELPA packages") >> > > -=C2=A0=C2=A0 (pred package-from-gnu.org?) >> > > +=C2=A0=C2=A0 (pred package-from-gnu.org-or-nongnu.org?) >> > > =C2=A0=C2=A0=C2=A0 (latest latest-release))) >> > > =C2=A0 >> > > =C2=A0(define elpa-guix-name (cut guix-name "emacs-" <>)) >> > >=20 >> > > base-commit: e8c1562599c7ebee8b7b228237fb0d75d4472a61 >> > Could we make it so that package-from-gnu.org? becomes elpa- >> > package? s.t. (member (elpa-package? pkg) '(gnu nongnu #f)) and its >> > evaluation can be reused? >>=20 >> Wouldn=E2=80=99t it be enough with just '(gnu nongnu)? >>=20 >> We could make the =E2=80=98elpa-package?=E2=80=99 procedure memoized to = avoid >> evaluating the same thing twice. > The reason for #f is so that packages that are neither from GNU nor > NonGNU ELPA are still excluded from the updater. I am not sure I follow. If =E2=80=98elpa-package?=E2=80=99 returned #f, th= e following would return #f. (member (elpa-package? pkg) '(gnu nongnu)) Meaning that PKG is not hosted on GNU or NonGNU ELPA, and thus, should not be checked for updates. When including #f in the list, the value returned by the =E2=80=98member=E2= =80=99 expression would be '(#f), which means that PKG would be checked for updates, even though it shouldn=E2=80=99t. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmHHK0kVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5etsP/R0/n6k5iK1MYwi3r+j0ZIkWP4Iz ovqCz6a5Omi4mHiRxI2kGLGxb5Z6OPNMNsdOlJwP8awzoTD1EwoXMaW1wPNXXw3r pHDDtg1g9YkOhAuMajKlQPf3PExyTzitUlNBaBF9AOmnxSO8WCnScKQb3Rf7IZrh VtMSO31k0EzyDB4LxKWyZoeilRTbsUexXGGM+5hTIKeiWfkcRPLJvNQA2siiWbP8 fuiuyzn69HF4U7ALOL5pvG0sKAsVU0d/7lc0PvFXeURoBcz9Z4WNjLgSrbiOti0f A0CO1RnPMqMow4hRckhRz3iG20/pl53AvCccwwFbxec3xgPN2sav3eadoSOU/R3v 5VONGLQ63uhE9wf1igaP3gVq3/jFstB+bewNrO3AZBww1EG1Vy0N3XSKd2yyjstn sFhLMT4yxQeZ6RbNPPHfYb+BqP1xSL6UFaDiKFftauRserMVoRL5ER7YsrmPgZZr cO87+IdOyJJVF0MHjbjneuLs+ULgN1O2N3gSVrQC7R3vUem0apegF1fG73SpUC+P bd0KyvZb3PM2oL2ZjqLQpy3n11s+lNqHz5bPcVz8LQK4nFS3vIoT7EptrYFkQR7t lD/Ip5HIMr1WCAOzzNsO2rQmYBqrugbPFzUYbj0vAWXsg/fDC1LxN8pPpgZoqXr7 bSVDVDTip/7UgGr1 =wUEy -----END PGP SIGNATURE----- --=-=-=--