From: Xinglu Chen <public@yoctocell.xyz>
To: 52774@debbugs.gnu.org
Subject: [bug#52774] [PATCH] import: elpa: Also check NonGNU ELPA for updates.
Date: Fri, 24 Dec 2021 12:25:21 +0100 [thread overview]
Message-ID: <87wnjub5y6.fsf@yoctocell.xyz> (raw)
* 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 <upstream-release> 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
next reply other threads:[~2021-12-24 11:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-24 11:25 Xinglu Chen [this message]
2021-12-24 12:17 ` [bug#52774] [PATCH] import: elpa: Also check NonGNU ELPA for updates Liliana Marie Prikler
2021-12-25 9:44 ` Xinglu Chen
2021-12-25 10:15 ` Liliana Marie Prikler
2021-12-25 14:31 ` Xinglu Chen
2021-12-25 15:23 ` Liliana Marie Prikler
2021-12-26 12:44 ` Xinglu Chen
2021-12-26 13:08 ` Liliana Marie Prikler
2022-01-05 22:18 ` bug#52774: " Ludovic Courtès
2022-01-05 23:03 ` [bug#52774] " Liliana Marie Prikler
2022-01-05 23:12 ` Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnjub5y6.fsf@yoctocell.xyz \
--to=public@yoctocell.xyz \
--cc=52774@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.