From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:59054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkWV0-00066b-Vn for guix-patches@gnu.org; Fri, 18 Jan 2019 10:56:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkWV0-0005ZR-4w for guix-patches@gnu.org; Fri, 18 Jan 2019 10:56:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37668) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkWUz-0005Yn-Vw for guix-patches@gnu.org; Fri, 18 Jan 2019 10:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gkWUz-0008RL-NM for guix-patches@gnu.org; Fri, 18 Jan 2019 10:56:01 -0500 Subject: [bug#34108] [PATCH] import: github: Use prereleases when package has no releases. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 18 Jan 2019 16:55:31 +0100 In-Reply-To: (Arun Isaac's message of "Thu, 17 Jan 2019 01:40:57 +0530") Message-ID: <87h8e6rmdo.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac Cc: 34108@debbugs.gnu.org Hello, Arun Isaac skribis: > 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). Makes sense. > From df660be0d7756b792a8356c7b02855cc327a7494 Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Thu, 17 Jan 2019 01:34:07 +0530 > Subject: [PATCH] import: github: Use prereleases when package has no rele= ases. > > * guix/import/github.scm (latest-released-version): Use preleases when pa= ckage > 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/rel= eases > - (not (hash-ref x "prerelease"))) > - json))) > + (if (null? > + (filter > + (lambda (x) > + ;; example pre-release: > + ;; https://github.com/wwood/OrfM/releases/ta= g/v0.5.1 > + ;; or an all-prerelease set > + ;; https://github.com/powertab/powertabedito= r/releases > + (not (hash-ref x "prerelease"))) > + json)) > + json))) To improve readability, could you define a =E2=80=98pre-release?=E2=80=99 p= rocedure so we can write: let ((releases (match (remove pre-release? json) (() json) ;keep everything (releases releases)))) OK with a change along these lines, thank you! Ludo=E2=80=99.