From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4GFkInWuxWFtrQAAgWs5BA (envelope-from ) for ; Fri, 24 Dec 2021 12:26:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OFrwHXWuxWFfXQAAbx9fmQ (envelope-from ) for ; Fri, 24 Dec 2021 11:26:45 +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 47CC46CD8 for ; Fri, 24 Dec 2021 12:26:45 +0100 (CET) Received: from localhost ([::1]:57170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0iih-0008DQ-Vt for larch@yhetil.org; Fri, 24 Dec 2021 06:26:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0ii5-0008Ch-IU for guix-patches@gnu.org; Fri, 24 Dec 2021 06:26:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0ii2-0001Ek-OK for guix-patches@gnu.org; Fri, 24 Dec 2021 06:26:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0ii2-0005bs-Ls for guix-patches@gnu.org; Fri, 24 Dec 2021 06:26: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: Fri, 24 Dec 2021 11:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52774 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52774@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164034514821536 (code B ref -1); Fri, 24 Dec 2021 11:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Dec 2021 11:25:48 +0000 Received: from localhost ([127.0.0.1]:35797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0ihn-0005bH-Jz for submit@debbugs.gnu.org; Fri, 24 Dec 2021 06:25:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:58778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0ihl-0005b4-Oi for submit@debbugs.gnu.org; Fri, 24 Dec 2021 06:25:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0ihk-00087V-D8 for guix-patches@gnu.org; Fri, 24 Dec 2021 06:25:44 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:42210 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 1n0ihW-0000vR-73 for guix-patches@gnu.org; Fri, 24 Dec 2021 06:25:33 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoctocell.xyz; s=mail; t=1640345122; bh=0tF+uN4J0K45cKGW/PCT/jh7gOGN8pDEIVFg10nOTa4=; h=From:To:Subject:Date; b=Y/woQK/s/gXDEAUSOKWBLvwwbSdgtYieJ5fvRQmKtgV96nFQvgJ/bAJOiGuDljb6B 24bGRbmiQZLicQMmobDqgvTr/jWcfRmFvj7C1O0HddfieKsodJOPAu2E2tIFcqrwd2 1jqt9lWLv7E82REhZ/J/X2p7LDuJBRrtBaBgt2zQ= Date: Fri, 24 Dec 2021 12:25:21 +0100 Message-ID: <87wnjub5y6.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 18 X-Spam_score: 1.8 X-Spam_bar: + X-Spam_report: (1.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, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=0.455, PDS_OTHER_BAD_TLD=1.999, PDS_RDNS_DYNAMIC_FP=0.005, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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=1640345205; 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:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=0tF+uN4J0K45cKGW/PCT/jh7gOGN8pDEIVFg10nOTa4=; b=nGR7a4U1nMMoZXW9mabnJuZMda9gftOPY4CqO6gkyk6BP9ZJW+5q8VBUC00fs+C8OcpnNS 4K9k5mU3dFICERST7VimPchiTc2oVOq5Ep9lDOHttgpmcCWxFf+H1To5NJFNCkYfNTQ3YI j0GyzP1zMNbYHD280qPx0ybyS+ZX9ZOV8LZVPlIk+BidVr5KSIvfQFFUA/BAgi3gg4JKoP 9JheZm7P0ibURu7SJTPg+g0qySDHvVqxcqIs8Ha64zWYycjZbYLvP89+mXylS5BraRAOvw uq8X65Wgml6M7205QdBNdqQfZwVb2F/TS5gnnjdri/h0ZcjuX4W70Lwvr81kAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640345205; a=rsa-sha256; cv=none; b=MqYYRNPG+MF94fbbl+KFC2SpBSRBGvfJKOaKD64x5LuiFBEK8VO0kW2ZPAClLJyNntVkt3 FUUHzMP28CYeU77+dGbNAibFpH1kvyKvtprPl8VlGKIt7h2pYV1srwbD1fIeM4chMO+wWs n01RdFrPJ3urwkFQS2BatpyYDF9iKfY+K0yeN6KAMOmt1++M008eX3VkAMHILzZSnld38Y eH7b24Bd/CZ536HjtsNODgbbGa9uGMDXtOSNc7C+HKe1dhWLXKLqRZU8Iocz7XyTWEhoB8 ePdAd88Bv8fsrzKZr0Lsvq8A8Jy51n10wvEd61nXdj629PHJTYxTm+jUn4aP7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="Y/woQK/s"; 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.06 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b="Y/woQK/s"; 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: 47CC46CD8 X-Spam-Score: -4.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: CYVrHfIuajN+ * 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 -- 2.33.1