From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 mEZoGOaKoWMsIgEAbAwnHQ (envelope-from ) for ; Tue, 20 Dec 2022 11:13:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +HUfGOaKoWPD4AAAauVa8A (envelope-from ) for ; Tue, 20 Dec 2022 11:13:58 +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 0542D18A7B for ; Tue, 20 Dec 2022 11:13:57 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7Z2u-00059g-4o; Tue, 20 Dec 2022 04:36:24 -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 1p7Z2Z-0004uu-2o for guix-patches@gnu.org; Tue, 20 Dec 2022 04:36:04 -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 1p7Z2Y-00038q-CJ for guix-patches@gnu.org; Tue, 20 Dec 2022 04:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7Z2Y-0003U3-64 for guix-patches@gnu.org; Tue, 20 Dec 2022 04:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH v3 14/18] import: launchpad: 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:36:02 +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.167152891513316 (code B ref 57460); Tue, 20 Dec 2022 09:36:02 +0000 Received: (at 57460) by debbugs.gnu.org; 20 Dec 2022 09:35:15 +0000 Received: from localhost ([127.0.0.1]:43773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Z1m-0003Sf-VE for submit@debbugs.gnu.org; Tue, 20 Dec 2022 04:35:15 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:33401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Z1d-0003Pn-T7 for 57460@debbugs.gnu.org; Tue, 20 Dec 2022 04:35:06 -0500 Received: from hermia.goebel-consult.de ([87.176.134.225]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mdvyo-1oZstm0sNS-00b5zl for <57460@debbugs.gnu.org>; Tue, 20 Dec 2022 10:35:00 +0100 Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 46A72669AB; Tue, 20 Dec 2022 10:34:24 +0100 (CET) From: Hartmut Goebel Date: Tue, 20 Dec 2022 10:34:19 +0100 Message-Id: <2b7d35f5b7052dab718e6e4c1c9407f1560bf63f.1671527962.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.6 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:1f8pR3fP9UjXnIjUYIOiwmpM5TEH1KXLaS0U7/qzDSHDe1/61ln W8w9+DAPwcb+KKR05znjcI+cyefLoZyquKNrJe9LBM0NGCj1+2vVvR/bvXp1y7WFWFdwQm8 hT3dHxKxBg2qZPfjlU3zDNwMr/YuJ5L4WjY2PD9BEfmCdQddL1t1mU1qz9c/bqLsE519TTQ OXCYRmz6Ra35XxITWfTmA== UI-OutboundReport: notjunk:1;M01:P0:rUGrKwsaY30=;wykPrkMZCmuR1RuaFmbnCA2ADBi Tw8Xx/SKyZ6TrCEynIgjFRGH+U78rOQh4OuR3apsbeOyZa1td3CDYeeNuaGGgLsJ8ecBFL+gM yTeah59iBkQfhwlB/ScmyHPKkXrZuDXH1UdvCCoprijsd0uaFKBjA2G+hDXucQXvHQmNK4qf2 ChM1lToQf1L0gqRRRRCBvEMB5nwymV+k1WmbU/V36z7Iv1smdAVdNfkaWqeNiOXHV6zNJpR/j GrS0iYDFPTtI3fFTtPqhakdvyMM+9eLZudKWnbvb/smR5x1sx59IbIbVS1dB5O1IBfvyEYYSn 2XYdz6j2GIdATo9q4luV6YRCB5lEzS/dzvRDGZKJMxiRr9lKEfA+UXpuwsd2tco0yneWvKFRB siDvc7+iPKaVqFuwaCgYvG62uK1Hf8woJB9deQCCRkwEEwkn7PLJFnWYJok4z7LV1xg1iU/nI 7G7HKE1cQC69Cj0hxmFPYZJWRjRa0orngF0xB/Vh/BJTv/2j5S4tj3F/Qww+aFto+EfDBStkm Z9qVUvk8pZjk2jo3R1D0u8bUOCCkjHFjZjpRc5xq5xLsNUQ2tOlIRqrEPMMGcDJw2IlOtIPXA xrtL1xhAuhrnj8hSV4pRvVZqS+Wayj/GGMxX94zvN6UIi6W1daQ1UcA2EOYmC35L6qhWARjLM UQBhWWfTvW3dy7v4RWaCrqKzqGqxSgRFe/M/dvOSdA== 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=1671531238; a=rsa-sha256; cv=none; b=hOcPzVqA2cZAuZFJ6POZLn/2CNYWCJ0ZBFmutB6+7QY80xANn7GYgAV3ENKiU+Vz+Luohv MBXt/hMLAREo938EZnV143eeCJcwcsmONYpnVuzDi3NupsR9UjYyjfFWONcyQE8DSMqcej /cVB+ZW0XQBYHBb+/Tm9H4Y6b/sRczKn8kzh9Fyl4cmd/eKSg396vUiTp4UH0Oa1PQxfLZ oj6Gva+DMKu4dzrWn+eg2GXunLww2enn8phE+OeH6CiF9hgI9hweCsFEd9vVyUHwh2ICof SXa7Ow0tXHvyPtk8k8rcYzcD24GGDQXRTg9jsQWUb4Px9Qu4ggrV8/hteiu8AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671531238; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: 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=UoeHSAL+qDR+C4lOf4ILbK84lAw+JGW6gmdFjj5MiD4=; b=eau55+5yFualYEdXnfLnVh7aPs+KucsCSpij5zdSa3v9eHmKcZ9HGmZsPIaNMbNtCqhkVL z2bPqEeKdXE+OuLdYq2JY9deJ/EuKBmOKdUGbYM8hxtdqwbdnMdbqRBP9b7wbAKKpP7vy7 qNrcHOS/Ah0UyiBRm4LUk/IrESenw+a2qH7D/N5Pokw2I4gL+P3tm546uVrBUxXFMt4WjF B7KPvdJTfUfNB6Z2npK+qaMKVWTCNFFLQFPCkzqLWrEzWJJT4sjQOQ/gQ1D1meNIWJZjLZ GWvYlPJ6W8t1YAhtlrFAuYHlddG9JyfcHKH/2GordHDEA72Yl8o1S97fQ5QMVA== 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.99 X-Spam-Score: -1.99 X-Migadu-Queue-Id: 0542D18A7B X-TUID: d+h7x/+IBqJS * guix/import/launchpad.scm (latest-release): Rename to 'import-release', add #:version argument. If version is given, return an upstream-source for this version. --- guix/import/launchpad.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm index b7e0295c4e..01953ea69c 100644 --- a/guix/import/launchpad.scm +++ b/guix/import/launchpad.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019, 2020 Arun Isaac ;;; Copyright © 2021 Matthew James Kraai ;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -121,8 +122,9 @@ for example, 'linuxdcpp'. Return #f if there is no releases." (last (remove pre-release? (vector->list (assoc-ref json "entries")))) "version")))) -(define (latest-release pkg) - "Return an for the latest release of PKG." +(define* (import-release pkg #:key (version #f)) + "Return an for the latest release of PKG. Optionally +include a VERSION string to fetch a specific version." (define (origin-launchpad-uri origin) (match (origin-uri origin) ((? string? url) url) ; surely a Launchpad URL @@ -132,7 +134,7 @@ for example, 'linuxdcpp'. Return #f if there is no releases." (let* ((source-uri (origin-launchpad-uri (package-source pkg))) (name (package-name pkg)) (repository (launchpad-repository source-uri)) - (newest-version (latest-released-version repository))) + (newest-version (or version (latest-released-version repository)))) (if newest-version (upstream-source (package name) @@ -145,4 +147,4 @@ for example, 'linuxdcpp'. Return #f if there is no releases." (name 'launchpad) (description "Updater for Launchpad packages") (pred launchpad-package?) - (import latest-release))) + (import import-release))) -- 2.30.6