all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#34108] [PATCH] import: github: Use prereleases when package has no releases.
@ 2019-01-16 20:10 Arun Isaac
  2019-01-18 15:55 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Arun Isaac @ 2019-01-16 20:10 UTC (permalink / raw)
  To: 34108


[-- 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 --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-21 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 20:10 [bug#34108] [PATCH] import: github: Use prereleases when package has no releases Arun Isaac
2019-01-18 15:55 ` 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

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.