From patchwork Tue Sep 17 18:59:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 15402 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 1A673173ED; Tue, 17 Sep 2019 20:03:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable 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 C550C173E5 for ; Tue, 17 Sep 2019 20:03:45 +0100 (BST) Received: from localhost ([::1]:49854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAIlN-0004xm-26 for patchwork@mira.cbaines.net; Tue, 17 Sep 2019 15:03:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35895) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAIhp-0002NP-TU for guix-patches@gnu.org; Tue, 17 Sep 2019 15:00:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAIhn-00014D-Mi for guix-patches@gnu.org; Tue, 17 Sep 2019 15:00:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44426) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iAIhm-00011U-Bp for guix-patches@gnu.org; Tue, 17 Sep 2019 15:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iAIhm-0003w2-40 for guix-patches@gnu.org; Tue, 17 Sep 2019 15:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37442] [PATCH] import/github: Check for more version prefixes Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 17 Sep 2019 19:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37442 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37442@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156874676315035 (code B ref -1); Tue, 17 Sep 2019 19:00:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Sep 2019 18:59:23 +0000 Received: from localhost ([127.0.0.1]:53247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAIh9-0003uQ-Aj for submit@debbugs.gnu.org; Tue, 17 Sep 2019 14:59:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:34097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAIh8-0003uI-4R for submit@debbugs.gnu.org; Tue, 17 Sep 2019 14:59:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35782) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAIh6-0001lb-E8 for guix-patches@gnu.org; Tue, 17 Sep 2019 14:59:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAIh5-0000eo-9j for guix-patches@gnu.org; Tue, 17 Sep 2019 14:59:20 -0400 Received: from flashner.co.il ([178.62.234.194]:48702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iAIh5-0000d8-07 for guix-patches@gnu.org; Tue, 17 Sep 2019 14:59:19 -0400 Received: from localhost (unknown [188.120.128.191]) by flashner.co.il (Postfix) with ESMTPSA id AFE1F400CD for ; Tue, 17 Sep 2019 18:59:16 +0000 (UTC) Date: Tue, 17 Sep 2019 21:59:15 +0300 From: Efraim Flashner Message-ID: <20190917185915.GA6057@E5400> MIME-Version: 1.0 Content-Disposition: inline X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.12.1 (2019-06-15) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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 'guix refresh openjpeg' gnu/packages/image.scm:762:13: openjpeg would be upgraded from 2.3.1 to ersion.2.1 I checked the git repository, there are a number of tags reading 'version.2.1' or similar. This allows for version tags 'version2.1' or 'version-2.1' or 'version.2.1' or 'version→2.1'. (still looking for a repo to test the last one) diff --git a/guix/import/github.scm b/guix/import/github.scm index 55ea00a111..df5f6ff32f 100644 --- a/guix/import/github.scm +++ b/guix/import/github.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2019 Arun Isaac +;;; Copyright © 2019 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -186,7 +187,12 @@ the package e.g. 'bedtools2'. Return #f if there is no releases" (substring tag 0 (+ name-length 1)))) (substring tag (+ name-length 1))) ;; some tags start with a "v" e.g. "v0.25.0" + ;; or with the word "version" e.g. "version.2.1" ;; where some are just the version number + ((string-prefix? "version" tag) + (if (char-set-contains? char-set:digit (string-ref tag 7)) + (substring tag 7) + (substring tag 8))) ((string-prefix? "v" tag) (substring tag 1)) ;; Finally, reject tags that don't start with a digit: