From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SMb+OIq6xWHZ5AAAgWs5BA (envelope-from ) for ; Fri, 24 Dec 2021 13:18:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CCOvNIq6xWEWBAAAB5/wlQ (envelope-from ) for ; Fri, 24 Dec 2021 12:18:18 +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 A97382424C for ; Fri, 24 Dec 2021 13:18:14 +0100 (CET) Received: from localhost ([::1]:35080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0jWX-0000nI-O1 for larch@yhetil.org; Fri, 24 Dec 2021 07:18:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0jWO-0000n3-EF for guix-patches@gnu.org; Fri, 24 Dec 2021 07:18:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:52517) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0jWO-00034Q-4Q for guix-patches@gnu.org; Fri, 24 Dec 2021 07:18:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0jWM-0006uw-Fu for guix-patches@gnu.org; Fri, 24 Dec 2021 07:18:03 -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: Fri, 24 Dec 2021 12:18: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: Xinglu Chen , 52774@debbugs.gnu.org Received: via spool by 52774-submit@debbugs.gnu.org id=B52774.164034823726534 (code B ref 52774); Fri, 24 Dec 2021 12:18:02 +0000 Received: (at 52774) by debbugs.gnu.org; 24 Dec 2021 12:17:17 +0000 Received: from localhost ([127.0.0.1]:35830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0jVd-0006tu-3g for submit@debbugs.gnu.org; Fri, 24 Dec 2021 07:17:17 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0jVY-0006td-OL for 52774@debbugs.gnu.org; Fri, 24 Dec 2021 07:17:16 -0500 Received: by mail-wr1-f65.google.com with SMTP id v7so17131011wrv.12 for <52774@debbugs.gnu.org>; Fri, 24 Dec 2021 04:17:12 -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=L73UhJEt2Ww29S0LRGUcv0Pw3eC0ETXB+NUxBx3J9YI=; b=doyEmBKebcv+v/PElygJwjZEhoA6tPcwKur9a1epHciuIqBi75/PHEW08e6FWhzBw8 ocSBgekrdIHcgRILanmrg5AnIX6fsqlvFPIGi3UR7glJrQhz3y9U3LytLVzahOp55YA1 3h/x4RwSVXUYBdsm6rZhIO6hVK1qDbBU/xkRWlSxhlxoyx9tQ0CCxW+nYmuRWvWPd82J riiXheJUjnEoP73opzKF3kQchwgznp8f2eBAmSilfc0oRl8ak9hKD77/XgJpGAxCVUIC kZ0osVMQkVFpwFdKWqQG5fh5gt6Sb+1P0T9q32c5nwj/rZCzYPb5Oi8B++52qfzjhL/d 2d+Q== 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=L73UhJEt2Ww29S0LRGUcv0Pw3eC0ETXB+NUxBx3J9YI=; b=aBUt7mXhp5iAjiBYh2A/NIy7w4GTErOUDoJEl/X2rM2rDVJOjqI4mUi2KjQ7z+6YTW +8SOPzes2y3R2v16FOdIK35E9OH38k3xxGzf1avI99/jSQh7+7vfgOh9oXORCMaHlp4U J2e7Vp7ggLwcHfjGQeohXzAExS5wHWAhKGngfCzG7AE0LY4yb1a5gLyRrTZYCg2q8b+h G928wH1sT/tgNxk0yIt22P5HxzOjQnuSBnhxhdioZHruGiVVqhR7X7LWPv+22drvFRbC wbx+ZZLyYcqoRoTN5jjB5cQp4qLdZszVtTk0bGDCAvTFFvuiorSp5bYAUxssPAKRHpvC Kbdg== X-Gm-Message-State: AOAM531MD9hCQNL8AqcDvJ3R49wbXijD7Ng06agZsogJZN60jEGnLpi9 Jp+Rey6TIOuHyCemVoFGb90= X-Google-Smtp-Source: ABdhPJwuQEhObQcxN7+Q4KtGiML6aw1Tju3h4mBAJhKqdeD3DkAcdv86gIO2xih250le9UXh0z46RQ== X-Received: by 2002:adf:c10e:: with SMTP id r14mr4702252wre.558.1640348226830; Fri, 24 Dec 2021 04:17:06 -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 o38sm5365998wms.11.2021.12.24.04.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Dec 2021 04:17:06 -0800 (PST) Message-ID: <76a91a888e6d4df4d46aa4dcc0fc3719c91e4c39.camel@gmail.com> From: Liliana Marie Prikler Date: Fri, 24 Dec 2021 13:17:05 +0100 In-Reply-To: <87wnjub5y6.fsf@yoctocell.xyz> References: <87wnjub5y6.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=1640348294; 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=L73UhJEt2Ww29S0LRGUcv0Pw3eC0ETXB+NUxBx3J9YI=; b=mPW6wFrvaa5zuA5EugFb5dKcew58PJQJvh3muosU0UfZk8XWkx1PQBZLG6ZyReuGgdq5gM x/RdRSn8cyzrsOGJadP/dLp25pWBW34iTp81T1x9Rf3ePNKoAeX4y6BPR2dkp73lZAtPmS lqJkvLe7OFBm34vMiA7WZIIwdql9EebtA4q53I5Z5u7rMR0BDtbsMCUAmQyGEnNU5OFS5w pfZs5ViiXsUhxuaqekwrvmvcprTM7/Sd1NRghGc/80uE8Jgtd6G+KCywF4P0vrWaViWNMX /GIRwe6AUMs59j6SfuktQIQZ0mwohrnzojbP/joS/skxbx5Sl/a4hdi0IkJGQw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640348294; a=rsa-sha256; cv=none; b=ixsHEql202t7NL7C2SbarAE8tHwik45rp5Tr2GH91JgEUA/DD6chXd56xyU3uLonjU3RMs 8XZ3vkD3Uodkq2rBSFDl4YG/a9fnNWVeJu4kaEiY1DmHjAcTY3l4Byw7Lq8sEnq9NS9w0H sac49idIh5ukzm8/ydpt9zroYGd6jYKBLgA87uOAH2lncuRRTI6ewLhhu0RWVohrGWiS5j wt8LyRy3iMOF0s7o/e0bQVfBjNMVHIWo9WOGb9oY6xqbazsqVFyHSZ9tQhzCcywKY65WF4 0FVhJtvq4LXLWBOYKx/gK7tnHp1Nqh/idEYGXUNdhhMy3f7cRkOAlch4AGltmQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=doyEmBKe; 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: -3.56 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=doyEmBKe; 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: A97382424C X-Spam-Score: -3.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: WUElW/KY9SNj 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? If not, I'd still use a cond or match in the definition of repo. Otherwise LGTM, cheers!