From: Arun Isaac <arunisaac@systemreboot.net>
To: 34108@debbugs.gnu.org
Subject: [bug#34108] [PATCH] import: github: Use prereleases when package has no releases.
Date: Thu, 17 Jan 2019 01:40:57 +0530 [thread overview]
Message-ID: <cu77ef4l5wu.fsf@systemreboot.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 298 bytes --]
For github packages with only prereleases (that is, no releases), `guix
refresh PACKAGE` prints out the no-updater warning. This is incorrect
behavior. It should instead fall back to using preleases. This patch
fixes that.
For an example, see the package quaternion in (gnu packages messaging).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-import-github-Use-prereleases-when-package-has-no-re.patch --]
[-- Type: text/x-patch, Size: 1903 bytes --]
From df660be0d7756b792a8356c7b02855cc327a7494 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Thu, 17 Jan 2019 01:34:07 +0530
Subject: [PATCH] import: github: Use prereleases when package has no releases.
* guix/import/github.scm (latest-released-version): Use preleases when package
has no releases.
---
guix/import/github.scm | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/guix/import/github.scm b/guix/import/github.scm
index b287313d98..624b8c5a66 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -179,14 +179,16 @@ API. This may be fixed by using an access token and setting the environment
variable GUIX_GITHUB_TOKEN, for instance one procured from
https://github.com/settings/tokens"))
(let loop ((releases
- (filter
- (lambda (x)
- ;; example pre-release:
- ;; https://github.com/wwood/OrfM/releases/tag/v0.5.1
- ;; or an all-prerelease set
- ;; https://github.com/powertab/powertabeditor/releases
- (not (hash-ref x "prerelease")))
- json)))
+ (if (null?
+ (filter
+ (lambda (x)
+ ;; example pre-release:
+ ;; https://github.com/wwood/OrfM/releases/tag/v0.5.1
+ ;; or an all-prerelease set
+ ;; https://github.com/powertab/powertabeditor/releases
+ (not (hash-ref x "prerelease")))
+ json))
+ json)))
(match releases
(() ;empty release list
#f)
--
2.19.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next reply other threads:[~2019-01-16 20:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 20:10 Arun Isaac [this message]
2019-01-18 15:55 ` [bug#34108] [PATCH] import: github: Use prereleases when package has no releases Ludovic Courtès
2019-01-20 20:17 ` Arun Isaac
2019-01-21 9:44 ` Ludovic Courtès
2019-01-21 12:36 ` bug#34108: " Arun Isaac
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=cu77ef4l5wu.fsf@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=34108@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.