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 MGW5LhzPLmOQbAEAbAwnHQ (envelope-from ) for ; Sat, 24 Sep 2022 11:34:20 +0200 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 +DbkLRzPLmP9vQAAG6o9tA (envelope-from ) for ; Sat, 24 Sep 2022 11:34:20 +0200 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 83C9A2C66E for ; Sat, 24 Sep 2022 11:34:20 +0200 (CEST) Received: from localhost ([::1]:57660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc1YB-00030g-Ci for larch@yhetil.org; Sat, 24 Sep 2022 05:34:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc1U2-00015V-W2 for guix-patches@gnu.org; Sat, 24 Sep 2022 05:30:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc1U2-0008Hz-Nu for guix-patches@gnu.org; Sat, 24 Sep 2022 05:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oc1U2-0001VH-Gk for guix-patches@gnu.org; Sat, 24 Sep 2022 05:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 00/19] Refresh to specific version Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Sep 2022 09:30: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 To: Hartmut Goebel Cc: 57460@debbugs.gnu.org Received: via spool by 57460-submit@debbugs.gnu.org id=B57460.16640117745719 (code B ref 57460); Sat, 24 Sep 2022 09:30:02 +0000 Received: (at 57460) by debbugs.gnu.org; 24 Sep 2022 09:29:34 +0000 Received: from localhost ([127.0.0.1]:42310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc1Ta-0001UB-0c for submit@debbugs.gnu.org; Sat, 24 Sep 2022 05:29:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc1TX-0001Tv-48 for 57460@debbugs.gnu.org; Sat, 24 Sep 2022 05:29:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc1TR-0008D5-UG; Sat, 24 Sep 2022 05:29:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Bl9Eer2D3doKUi8sSvAMcaC6eQVscNSoPNorDUbXSmQ=; b=FH9W7QwiWwp07uhBcTJH KOXvCpPW4n0pG91wPkjtzoEJ4t643uzRRQkhnAqu2pnZmv2nKJfW7AhRXCvgDjFp/LuKcc64Wne3P pm5+crLFw430DWDDyJtzdw5i/L2x0tJMm+WTVY8NHUeTTzzYVteGfjycC9c1nUv9xbn8F3Eh3WzzZ DvXnzQknxwLLwbuBrkWdH877IIA5Oq6WMn1VuU82YiT7FSBsrKGuSEvJQhEgT23pQme5cw5+jg4dH IKfGFE0bSwT9k7qKMt32GvUGBfKalfe0aox2apoAhulqxykUKfGSRrK0co3zVqDSObwhbBA7MTkYs eyeymmvgfEIRHw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53962 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc1TR-00086T-GR; Sat, 24 Sep 2022 05:29:25 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <772d6b613a69ae950b657d94a51019928fdfca5b.1661691694.git.h.goebel@crazy-compilers.com> Date: Sat, 24 Sep 2022 11:29:24 +0200 In-Reply-To: <772d6b613a69ae950b657d94a51019928fdfca5b.1661691694.git.h.goebel@crazy-compilers.com> (Hartmut Goebel's message of "Sun, 28 Aug 2022 15:18:36 +0200") Message-ID: <87y1u9ce8b.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664012060; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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:dkim-signature; bh=Bl9Eer2D3doKUi8sSvAMcaC6eQVscNSoPNorDUbXSmQ=; b=ap76Oh0s96jw8tQLknsrwoM34VRB39/3ohCqFcgEVj9sWdfjiY+XmkqSjYdrMQVs8kaMy7 8vo1HbGAtHgl89RMWX1K4qiplfrU3YJvJ+QC6+9QMwetSbIzL113F5rPFLjKDTx+RXdO/g RMyCnvHHgAEFF9MwamzTiZd+PikCiPf5DD7D7IxNmgXxsqaO3cizzOeNgTdrPSZHciIT0k n/XIgasgFcUDgvAobV56uEGYbYG0AbzK1uP3w0C1FxKIvD6D7dp1yXOfwDQ3OUmvwInb9V 1IZBt04t+iOc7XQy/1giguPdXsehPB8PcK4yDRPUpsbQQPe2tgfOuIIT6o8BwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664012060; a=rsa-sha256; cv=none; b=FtFpL72gGDVvqDWltNiWDSDLRTk4uX96JtDWSKHW/JVxqVvKOEvzlbcBQqfnWpHnEe3Z1u qC+VDYKzx+cDpCs8MExz4GfhdQvrtp8H/QM4uw2uESQUekgSX+x40QqcSwju2VXkttAQJ1 fMYu9AR5qVT0zTPn8RtAIFUrsnK8IQ8v4L/ubKSRkFf3qj83UjTH5mpDIcBN2LzmTy5xcU lYqUNjwzzFo7S/sMwhF5ITKav4zGFpiFMaqFvT6LUF9JhfG4sC4Xn+j/hC7y8jqgiVhtI6 ki4V6tGl5+5AWQLrR3is1QosF3E4+8qvD+zkcPMWb8r53Lr4oWSQERjPCW7yjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=FH9W7Qwi; dmarc=pass (policy=none) header.from=gnu.org; 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-Spam-Score: -2.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=FH9W7Qwi; dmarc=pass (policy=none) header.from=gnu.org; 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-Queue-Id: 83C9A2C66E X-Spam-Score: -2.26 X-Migadu-Scanner: scn1.migadu.com X-TUID: NR65vMRSXuc5 Hartmut Goebel skribis: > * guix/import/gnome.scm(latest-gnome-release): Rename > to (import-gnome-release), add keyword-argument 'version'. If version is > given, try to find the respective version > [find-latest-release]: New function, based on former code. > [find-version-release]: New function. [...] > + (define (find-latest-release releases) > + (fold (match-lambda* > + (((key . value) result) > + (cond ((even-minor-version? key) > + (match result > + (#f > + (cons key value)) > + ((newest . _) > + (if (version>? key newest) > + (cons key value) > + result)))) Please reindent =E2=80=98match=E2=80=99 as it was. > + (define (find-version-release releases version) > + (fold (match-lambda* > + (((key . value) result) > + (if (string=3D? key version) > + (cons key value) > + result))) > + #f > + releases)) I guess we could start at the first match instead of traversing all the list, no? How about: (define (find-version-release releases version) (find (match-lambda ((key . value) (string=3D? key version))) releases)) ? Otherwise LGTM.