From patchwork Wed Jan 16 20:10:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 754 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2449F16A88; Wed, 16 Jan 2019 20:12:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RCVD_IN_SORBS_WEB, T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 7FCDB16A87 for ; Wed, 16 Jan 2019 20:12:08 +0000 (GMT) Received: from localhost ([127.0.0.1]:42561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrXj-0005Mb-Pc for patchwork@mira.cbaines.net; Wed, 16 Jan 2019 15:12:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrXf-0005Lz-9I for guix-patches@gnu.org; Wed, 16 Jan 2019 15:12:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrXe-0005zG-Cr for guix-patches@gnu.org; Wed, 16 Jan 2019 15:12:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrXe-0005yE-8P for guix-patches@gnu.org; Wed, 16 Jan 2019 15:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gjrXd-0004c6-UO for guix-patches@gnu.org; Wed, 16 Jan 2019 15:12:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34108] [PATCH] import: github: Use prereleases when package has no releases. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Jan 2019 20:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34108 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34108@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154766948117687 (code B ref -1); Wed, 16 Jan 2019 20:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jan 2019 20:11:21 +0000 Received: from localhost ([127.0.0.1]:33917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjrWz-0004bD-4c for submit@debbugs.gnu.org; Wed, 16 Jan 2019 15:11:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gjrWx-0004b0-QJ for submit@debbugs.gnu.org; Wed, 16 Jan 2019 15:11:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:39380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjrWs-0003Dc-K2 for submit@debbugs.gnu.org; Wed, 16 Jan 2019 15:11:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrWr-0005J8-KG for guix-patches@gnu.org; Wed, 16 Jan 2019 15:11:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrWq-00033h-Lq for guix-patches@gnu.org; Wed, 16 Jan 2019 15:11:13 -0500 Received: from vultr.systemreboot.net ([45.77.148.100]:54304) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gjrWq-0002nn-6b for guix-patches@gnu.org; Wed, 16 Jan 2019 15:11:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Type:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=piBwaF9XLzV1cu8vvY6rs9U7lIapxNbodmnEjZpbh90=; b=m5K971kBslW/9Alwb8jFksAhZt 14PJYbWN0rpmcOY4MuV1K12pklIMEdGdeeS1bmb6yYwAMrbGdSfXbkjwWSi1PvF3IfVTb2pqi1q4G UQiU8/EWRavyE1Bu6pF0V8GuPHTBp92He4A1cu6U5QfIoWtX06oG99OfeV5RlECh5Qk4=; Received: from [103.5.134.173] (helo=steel) by systemreboot.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gjrWk-0006lF-VF; Thu, 17 Jan 2019 01:41:07 +0530 From: Arun Isaac Date: Thu, 17 Jan 2019 01:40:57 +0530 Message-ID: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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). 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 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