From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kAK6A6CHoWNJvgAAbAwnHQ (envelope-from ) for ; Tue, 20 Dec 2022 11:00:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qNnaAqCHoWP8awEAG6o9tA (envelope-from ) for ; Tue, 20 Dec 2022 11:00:00 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CBEB5184AF for ; Tue, 20 Dec 2022 10:59:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7Z2n-00056M-Lg; Tue, 20 Dec 2022 04:36:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7Z1h-0004gZ-P1 for guix-patches@gnu.org; Tue, 20 Dec 2022 04:35:12 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7Z1h-0002wE-Fb for guix-patches@gnu.org; Tue, 20 Dec 2022 04:35:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7Z1h-0003S6-Ba for guix-patches@gnu.org; Tue, 20 Dec 2022 04:35:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH v3 12/18] import: hexpm: Allow updating to a specific version. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Dec 2022 09:35:09 +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 moreinfo To: 57460@debbugs.gnu.org Received: via spool by 57460-submit@debbugs.gnu.org id=B57460.167152890413190 (code B ref 57460); Tue, 20 Dec 2022 09:35:09 +0000 Received: (at 57460) by debbugs.gnu.org; 20 Dec 2022 09:35:04 +0000 Received: from localhost ([127.0.0.1]:43751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Z1b-0003QT-JJ for submit@debbugs.gnu.org; Tue, 20 Dec 2022 04:35:04 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:45501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Z1X-0003PV-67 for 57460@debbugs.gnu.org; Tue, 20 Dec 2022 04:34:59 -0500 Received: from hermia.goebel-consult.de ([87.176.134.225]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M3lHZ-1p7q8c2JiV-000tbY for <57460@debbugs.gnu.org>; Tue, 20 Dec 2022 10:34:53 +0100 Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 1F781669A9; Tue, 20 Dec 2022 10:34:24 +0100 (CET) From: Hartmut Goebel Date: Tue, 20 Dec 2022 10:34:17 +0100 Message-Id: X-Mailer: git-send-email 2.30.6 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:mzFNjKuF+TBILaxeh4Ya+sTVtL8UnndHAOrBXLtxqDq1dp3qwwu ENip14OFVoNUaIVMo/PmVpT/PZgLjrSsdHswSm1n+Vrl7F0d72E9PiClpOQgCxbsnT4eajS /panXcsWyr+ceXmzOwCZ0WnTc6Fcww0E6v0iJFx82SvpPxgxu3MaxCiYafhX+y4rj9FJKha 2/MdZay+mS2MXD9B9frTA== UI-OutboundReport: notjunk:1;M01:P0:h0maMFhPUoA=;phmBVAH5fpwQHxXUHyFmoHQ9L3i 5/pr+2Drc8S8xdz18tD2x2gl34MSAq5unkyJTnR/0sslOxL1UkqBjr4NY2gmeQE3VPRig8lLP /vGybJmmuxchobwOXBFp6U2nbn3hp1OeBNgqQk1qDgH7Fxw1hsVWO9q5r6ldrz/GJuZpP452B +4XyAsV4xWzWEVKBDM8M76e9ivEzU4HEJqS3MdFiENvwRXtMlvqJbqdqoHlo9AjuB7eq7ToLa KS/E9bmshQyGHoac86usYJxaUgBogLi0vfGRgzmPd3ToZtY9pB0t7KFYvGbGGss4xxlkUN/rO QXVYv3NRiejqAr/pfGOMgCAehuw38aYBjWAYADerERd5bShe8HXbmnQ+41HcsZjuCx8pgVRqM Elp9Txc8GBhQHV/Kf/f+zQv3xw+/ig2NDPzKiTC9CTZUGpcTTj2iCLfPPsMTM+ue+mDRYN4JN Q7sTmhEJYu9NpetCzpNFkdGGVuIhvQqCjt1me7Y8c1v0npMEpNOOB4epFy4bGB1mL7B6Vsodr 7gH3bw0PBVs30IkFBazaq3SjrdT3BPy8OhmrpEI/TYi0QMWKn0UwmvjJ1RjpR1iHK7vG3GkZ+ 7AiXwVFRm8NRHwzbbRvJjWBc/9N1eCSnl1JVaoWnBxQlO+/qg8OZXdF7kBWZ6wRVutknzQZ7x XK9oeFE4R+06KVZymud6hbuViyrWq7cV3He3l+Ndwg== 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671530399; a=rsa-sha256; cv=none; b=NLIi0vI7E1iDAEZNAktios9FCU465s5y7uwGxKifUB23jf4tqQTHhM2rE88tBrsvVEaVAJ 4k8fr6HaBKpKmM/XeCUHw7eAUwSuqQXV9EldmAz3cqzCxp+QcIOk2HbKezWjHfnrAiKtGc 1iGJ5uBuGt82TtenuHdk4t1MJ9upyolqlj8Hk3egnCsPthzKFqfKNP972jPyZ6ryMFE7k4 4ERONDNWILyF7L3i70gPra2/u+9+reFdyaoF/s9fTzXmLnrpgMna43xlbuEBHUWDkQfTZv zQ5a5TBf7ESiXo4pHeoJFTyFkrjLA9KdpUkIR2i1l+2dMTbCyQME8/6QwdsHsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671530399; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=MG27sxWu4O1lZ7AfhDSTedVkyHm9zcLv3MdnoVfmB/I=; b=gKwl2lN2hCb321EHaTQBWVVeWhJHu3umI/xRB+o1ZB85iAB1lQ5GcDYZQrCrIdWEaEwc5u hY+lPHHuR2KlJofysdlw1N6sl0tSIdW9Mk0roMzNeB++aAKT5Al9SVarAUW6k3Io8q5j2T NY9XbKWAfEsQ7FnZysuycyMrWLjDlCKERM3tjDncRs2S2igutqGgmoI/ry0otPgcFnlPBd 1U7ayKqbJw59z2KWM0IYT1Vximpz3+yBfxtiJKoWqs5SGUxp9CsbqEsOfUs+pHCJZztFnj +sBInenEgmCVWrnK0JFAh5Umg2todGEjzdTwRbI7weDlgzBhk5mHLiCqcys5og== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.49 X-Spam-Score: -1.49 X-Migadu-Queue-Id: CBEB5184AF X-TUID: LaESso7NM7tK * guix/import/hexpm.scm (latest-release): Rename to 'import-release', add #:version argument. If version is given, return an upstream-source for this version. --- guix/import/hexpm.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 3b63837393..8a009fd245 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -328,11 +328,12 @@ latest version of PACKAGE-NAME." ;;; Updater ;;; -(define (latest-release package) - "Return an for the latest release of PACKAGE." +(define* (import-release package #:key (version #f)) + "Return an for the latest release of PACKAGE. Optionally +include a VERSION string to fetch a specific version." (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 +345,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))) -- 2.30.6