From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ML3gLN7vxmEUeQAAgWs5BA (envelope-from ) for ; Sat, 25 Dec 2021 11:18:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cBacKN7vxmGkagAA1q6Kng (envelope-from ) for ; Sat, 25 Dec 2021 10:18:06 +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 282551A63 for ; Sat, 25 Dec 2021 11:18:06 +0100 (CET) Received: from localhost ([::1]:37152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n147p-0008Py-BZ for larch@yhetil.org; Sat, 25 Dec 2021 05:18:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n145r-0006lv-2W for guix-patches@gnu.org; Sat, 25 Dec 2021 05:16:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n145q-00089B-Ij for guix-patches@gnu.org; Sat, 25 Dec 2021 05:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n145p-0006gC-Uk for guix-patches@gnu.org; Sat, 25 Dec 2021 05:16:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52774] [PATCH] import: elpa: Also check NonGNU ELPA for updates. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Dec 2021 10:16:01 +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: Xinglu Chen , 52774@debbugs.gnu.org Received: via spool by 52774-submit@debbugs.gnu.org id=B52774.164042732325615 (code B ref 52774); Sat, 25 Dec 2021 10:16:01 +0000 Received: (at 52774) by debbugs.gnu.org; 25 Dec 2021 10:15:23 +0000 Received: from localhost ([127.0.0.1]:38526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n145C-0006f4-En for submit@debbugs.gnu.org; Sat, 25 Dec 2021 05:15:22 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1458-0006ek-Aq for 52774@debbugs.gnu.org; Sat, 25 Dec 2021 05:15:21 -0500 Received: by mail-wr1-f65.google.com with SMTP id t18so21736451wrg.11 for <52774@debbugs.gnu.org>; Sat, 25 Dec 2021 02:15:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=I01ddeUQE6Hlm+fYoACksvXAIQHKpLBWok44GP/R6oE=; b=Px41bQv2dPbUi2fwenyjKraC21cjEAOH2Q7hV62UqvTz67yYzpNTbitNAtIk5YSxGf 2R0CEDeYS1hZb5zJU2mYH/Sg4f8I6Figt4cmyxAQBju/FU4TKVYj0HzGeDcq7t4kHLQy x6lvpE+IfgduhrJRiAGHxBDoJvoDhdwOx2HqkDPhJ/QBODh2EtZMJWhkmm4arsJ8cCee lYu5+syybyIaVv/n1g/IFSHKt80YPcjnnAiKWjFz2QcUEcyQZbkFLyFg9hY/yrUODl4r DgJqxQFomIz5QQ1C3splHHRSzBN1Fnctf/X/j6CdRGnNLxgeCabqWgkAYT07CAXf7bN0 aR7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=I01ddeUQE6Hlm+fYoACksvXAIQHKpLBWok44GP/R6oE=; b=SPe3pV/R/nnXQzyaRNGgPd0NGjXtuDi+q7OUSSaqUF30UuUjaCCP3Jw8DfpSnnpKg8 kXIUx8RXfshEsN91bqTtlIY/Ii8f3osVyxS4TdTg8VzpdIIYrOpfj0Iaz0yarIDLrDGc MFg5WkoUlGDtIIV9ACjJJi6BJLozb40ZKeNOZGf9iSKFmzb8vBLYen0JuF+wesf/djQH 5e65FxwsgepAKWyfCLMDa6K0S6fT0aRGtMoZRB8OMhOp4NdOzN4RoF4kWa6/PjTKn3Pv IOYpnFh7v/1oisGZUYCWp/rBbVITr5+xcm3U1Sjz2qYsvyNYyKFD4vzO2CTW+dy/U55v ZqcQ== X-Gm-Message-State: AOAM530yW+9eD5jX7SlqBSytciHnNTfU49qwf5LwOLi5ku2rMXX4DNzH 7R3YyCfyNC2Gc31D7tEsFftzEjTPCkwsJg== X-Google-Smtp-Source: ABdhPJxKItFGN+MENBkLJjB7UHgXEIkeruovk71ZtHhmFykSWsEihDaBtoPpp/Wrw2sxXKHnkZ9/GA== X-Received: by 2002:adf:97c2:: with SMTP id t2mr6988278wrb.577.1640427312490; Sat, 25 Dec 2021 02:15:12 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id r1sm11772946wrz.30.2021.12.25.02.15.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Dec 2021 02:15:12 -0800 (PST) Message-ID: <0da0a9c2b0f6165712f0a81aab157833a79aecfc.camel@gmail.com> From: Liliana Marie Prikler Date: Sat, 25 Dec 2021 11:15:10 +0100 In-Reply-To: <87r1a1auic.fsf@yoctocell.xyz> References: <87wnjub5y6.fsf@yoctocell.xyz> <76a91a888e6d4df4d46aa4dcc0fc3719c91e4c39.camel@gmail.com> <87r1a1auic.fsf@yoctocell.xyz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640427486; 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: content-transfer-encoding:content-transfer-encoding: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=I01ddeUQE6Hlm+fYoACksvXAIQHKpLBWok44GP/R6oE=; b=MA4XIdNMiOnyg2WBePITcaOhuca7mRuBv9SQQhig4cBR2c0JcKvTxMQE/V3V0JsoxKs/px mZ5//ZPm5pjS5xvba74wl4Ow9wR2hb0l6DdX1XjMVZI+QnQ7YhdfhZ5WJ0S7UTaatI2Tzh erwkj0LCCHWSiy/5jo7nQkGzRed8ZNH1LXMinxOhhv7wOthq2xkNAsk6/6pIR8y4mwbGje h+k8+O9sPnDKzI84Q1TinZbXMv2qcvNTUoTbmfZr4beTXPsjhpZoYuFsjc+vtohF8XxwDb f5uTNTOyiqeLfkEBIJv8mefiUCI/jqz++lmUmlcaPJkezJKoBurSaz4wPO1K8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640427486; a=rsa-sha256; cv=none; b=SInIqC+ka0kNIGkxAsw2O33TdjcSYN4S/UbRUwsA5XI/iYUd437QnynC00WQq5miNJCdUz uaRKg1ChYN06wwWS/h6GnSNH0h2MTeWYRP9nOsUXjg29fqAg0QO9ADVigjLFo9T1OoYAl4 G7xVb9DMeyiH/zU8ikjJU8qtTM+to++6D/RnSF28TvPhSVKua4FTRGqkgLW749aEMN4oC8 U6+NC7ivBGozUYIepqLU7LwPdNgj5LgpueuhfoZi4J48n5IK3fU+YR+MJZJ9cTsKu0tIwF PRz2J61bsioOzkVctaPHovT0Xa7WVS46loCCKsHB7fp7kHV2hJYg0m+cJDsDYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Px41bQv2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: -1.96 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Px41bQv2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: 282551A63 X-Spam-Score: -1.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: TWgo+ibttEjB 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: > > > 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. > > > --- > > >  guix/import/elpa.scm | 13 +++++++++---- > > >  1 file changed, 9 insertions(+), 4 deletions(-) > > > > > > 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) > > >  (define (latest-release package) > > >    "Return an for the latest release of > > > PACKAGE." > > >    (define name (guix-package->elpa-name package)) > > > -  (define repo 'gnu) > > > +  (define repo > > > +    (let ((url (origin-uri (package-source package)))) > > > +      (if (string-prefix? "https://elpa.nongnu.org" url) > > > +          'nongnu > > > +          'gnu))) > > >   > > >    (match (elpa-package-info name repo) > > >      (#f > > > @@ -443,11 +447,12 @@ (define repo 'gnu) > > >          (urls (list url)) > > >          (signature-urls (list (string-append url ".sig")))))))) > > >   > > > -(define package-from-gnu.org? > > > +(define package-from-gnu.org-or-nongnu.org? > > >    (url-predicate (lambda (url) > > >                     (let ((uri (string->uri url))) > > >                       (and uri > > > -                          (string=? (uri-host uri) > > > "elpa.gnu.org")))))) > > > +                          (or (string=? (uri-host uri) > > > "elpa.gnu.org") > > > +                              (string=? (uri-host uri) > > > "elpa.nongnu.org"))))))) > > >   > > >  (define %elpa-updater > > >    ;; The ELPA updater.  We restrict it to packages hosted on > > > elpa.gnu.org > > > @@ -455,7 +460,7 @@ (define %elpa-updater > > >    (upstream-updater > > >     (name 'elpa) > > >     (description "Updater for ELPA packages") > > > -   (pred package-from-gnu.org?) > > > +   (pred package-from-gnu.org-or-nongnu.org?) > > >     (latest latest-release))) > > >   > > >  (define elpa-guix-name (cut guix-name "emacs-" <>)) > > > > > > 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? > > Wouldn’t it be enough with just '(gnu nongnu)? > > We could make the ‘elpa-package?’ 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. Cheers