From patchwork Sun Aug 28 13:18:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42035 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 DECFB27BBEA; Sun, 28 Aug 2022 14:21:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A582727BBE9 for ; Sun, 28 Aug 2022 14:21:14 +0100 (BST) Received: from localhost ([::1]:58552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDx-00055u-S2 for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICu-0002uD-Az for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICu-0002fT-24 for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICt-0006yk-UE for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version (hexpm) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57460 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57460@debbugs.gnu.org Received: via spool by 57460-submit@debbugs.gnu.org id=B57460.166169277926657 (code B ref 57460); Sun, 28 Aug 2022 13:20:07 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:39 +0000 Received: from localhost ([127.0.0.1]:57795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICR-0006vh-7O for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:39 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:38897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC8-0006tf-G3 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:20 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mn2iP-1pAfZN3jfT-00k4XN for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:14 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 0E1E965A40; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:37 +0200 Message-Id: <84d6e3731a5c8ac6a76c9810356f478c25b1d8d2.1661691694.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:PeG4XRPZBsA0T6yqwzeR7k76eCTyT2BEtN/qP581V1GR3CfZizt 1uIjizvnGgewFwf2+hAIxG8p3q+YVU2yx4LLyzclc4a7hQIh/wRKbhj+i/kIUyi1bBWoKr+ V2Sicyn2BlwenkV1loYC/5d/mdd0tZU0KIDPO4IElXuPIEUv7QSxiD2dFzPa6K3TjaNxZfP 2w9TlghYH7IVsIWGdUnXw== X-UI-Out-Filterresults: notjunk:1;V03:K0:5cMQNAsV6mU=:cHwMlFtOx6hEjzDeK/Suz4 cmlrwBZlvOGNLtoCW66Kyb6sERpeFjkPTJnCcqeDYzuKSh5BQt2cbx0zXoQ6AZ3tJhJSFChrn /964SvjUu9DO9OueV73fW7PujtxomxDdyZmcqAusBPBKMFpQ6A6z3bybYdNNZz3IJSj8HEvGW 2Wfnpl5Y9KqSebQ2e7GYwJ+y0n9n0dT2sPCXz7XRX4tcAcXloeYWPYBY7o1bbw0Rjyzi+w6C/ awj4Nr5SAY3ZevbDXVhU7IKEbCfyLpqCwGHwP2wsMWE+JiAE0wskHjx2KoMfVZ5A8bNcEshTx IyccNJkze5XvnCoUs+tIY/xjBj463ipLaWrC+4JUy1LLNMNG3/FltB22YmtWe/SpIS9tSZcdG d8G1eWR3V8q8PFfWuahFHQx6iVs2N4zxND4/c8P4l9Xh/wFojaPWnrpP4og3H84lW2L3N4sZp 936kTlHNEjUHTdDUNV1RYLf+Gfpl2k3SKJZyg9tRPAdnO36Z4GPum5EQvB328qaoIZu0vSx2q EUmhoouA97NERygaf0YFElNMKM8vKO3TJkLt1eL9TQigibRikHGVQmT1XxivznW+pNMOOv8CD TpSk0CPiysqluhNpuTDbZNr1uWus7dzsTpmYX0udkzixnrD0T/IDSpHJ+UXb9tf5oo266447R F53+RQLEYM3rWvnttnBmhxNLt5xa0P+8zElLodSav0Zv/n9WUkO6i91DkJ5KKjM630SOcdxBr GUKWw9jyA5fbDTWzMSXE4uMVQsAP5JgC45cnsLFBq+hL+xHC3Zs2ZkANOGU= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/import/hexpm.scm(latest-release): Rename to (import-release), add keyword-argument 'version'. If version is given, return an upstream-source for this version. --- guix/import/hexpm.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 3b63837393..652df5dd0e 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -328,11 +328,11 @@ latest version of PACKAGE-NAME." ;;; Updater ;;; -(define (latest-release package) +(define* (import-release package #:key (version #f)) "Return an for the latest release of PACKAGE." (let* ((hexpm-name (guix-package->hexpm-name package)) (hexpm (lookup-hexpm hexpm-name)) - (version (hexpm-latest-release hexpm)) + (version (or version (hexpm-latest-release hexpm))) (url (hexpm-uri hexpm-name version))) (upstream-source (package (package-name package)) @@ -344,4 +344,4 @@ latest version of PACKAGE-NAME." (name 'hexpm) (description "Updater for hex.pm packages") (pred (url-prefix-predicate hexpm-package-url)) - (import latest-release))) + (import import-release)))