From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 SNzqGOXRLmP7FgAAbAwnHQ (envelope-from ) for ; Sat, 24 Sep 2022 11:46:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QOIFGeXRLmPwkAAA9RJhRA (envelope-from ) for ; Sat, 24 Sep 2022 11:46:13 +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 3B8A42CCBA for ; Sat, 24 Sep 2022 11:46:13 +0200 (CEST) Received: from localhost ([::1]:49856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc1jf-0007Yd-HN for larch@yhetil.org; Sat, 24 Sep 2022 05:46:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc1jX-0007Xf-4d for guix-patches@gnu.org; Sat, 24 Sep 2022 05:46:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc1jW-0002E0-Rf for guix-patches@gnu.org; Sat, 24 Sep 2022 05:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oc1jW-00046l-NF for guix-patches@gnu.org; Sat, 24 Sep 2022 05:46: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:46: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.166401275515752 (code B ref 57460); Sat, 24 Sep 2022 09:46:02 +0000 Received: (at 57460) by debbugs.gnu.org; 24 Sep 2022 09:45:55 +0000 Received: from localhost ([127.0.0.1]:42335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc1jI-00045u-Pr for submit@debbugs.gnu.org; Sat, 24 Sep 2022 05:45:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oc1jG-0003xZ-Vr for 57460@debbugs.gnu.org; Sat, 24 Sep 2022 05:45:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc1j9-0002DB-Sd; Sat, 24 Sep 2022 05:45:39 -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=9yPRiaOzwHd/cL9/lnkWr2lXqU7Qz31rar0V9RAuGdo=; b=a+XRoaaVEemrlw+4+0qB 7hToGyT0pMm3OEnWnjU551+K8gFZSN92PFm009DmqZOxAKdP7iDYjtw2wmvyDI5QcrtjG+xhvcEzl 8rkCcLIWhS2Gnsmb4bcwZlBRyoqswEDN0UE52zv3M5rqZFrMkoCrjJ9sW7nUbxZxZ4gUgQwRWOhrT 6QS8aaKLQyFGdJ5CLGgTYmc4Vq0sQEuKpw5gouRosuSkKfNy9AZgc8juwqPTUKFxe4DlLSs4T4UYq E3DSVOvwmaXo6vZt1NeXEq6J8Y1N8ranzFASNLpUi6K6y65l+fr3ZfIhgrul1BYYWkHQtXigzZi7J m49jEegRUWhgBw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59109 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc1j9-0003j7-5X; Sat, 24 Sep 2022 05:45:39 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Sat, 24 Sep 2022 11:45:37 +0200 In-Reply-To: (Hartmut Goebel's message of "Sun, 28 Aug 2022 15:18:41 +0200") Message-ID: <87h70xcdha.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=1664012773; 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=9yPRiaOzwHd/cL9/lnkWr2lXqU7Qz31rar0V9RAuGdo=; b=GiWWC1HC9tmJqDsWU5/uE7mSiMnO4UGNMPEW1m9aUHEj1vIQbdY7nqCiZinwJWF3VWj7z3 9tg8iOrstBS9NAC6IyH+7lR9hNxUa4pYckh6PFtYD+PK2HeZY9nFpHvTEtFas6jEGT29NQ rGmIGRPKI5vjpp2XYL6WDiKtYyFNRr3uWdEI304sGDzxAnO2arxY+amfodjuzmA5qclLUU wt5WMvbbtpNQnjydsb72o0+E955CXAATdfg1rW48pNZCqgJLE3KqddZr3GUBclN3Sxn03I BB/zD57ECzg2VdoG30hcNFvrNsl5na8L2qNyadGzV/I5aHeVNwMbrGIFhqAHmw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664012773; a=rsa-sha256; cv=none; b=pvTR8uHvO6ivt8vvyD/FA2h5rhiILvWH1pE3Z8lIJob+WhU2WRtWl8nklLt0DFPzfbx+N0 1CbGrgXoNj2LFhQyv1yt+mrVtdPqRSxudEUWNBvqNWpZVFBkICyCU4AJyMMjRBCNjzcFB1 rveVBYET4dSyw+t8RqAj0AZzuHsS6xKP9cv7Bkc6L78RGmmdkNMb61DVUU990rEkfwLJzw cmDW2iec2i9TFdVioX9NEBYfBaeQpWiRk4w0Rt/4V8NY83a6wF+CvjJitlMCnO74J2KJMB h8g95FOWmQUOLNrFE8E3qJOD1O6DLh4RSeGI8u2xLqMA8II6P6jFC2rRtkRsVw== 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=a+XRoaaV; 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=a+XRoaaV; 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: 3B8A42CCBA X-Spam-Score: -2.26 X-Migadu-Scanner: scn1.migadu.com X-TUID: gYUAMEtaAfos Hartmut Goebel skribis: > * guix/scripts/refresh.scm(options->packages)[args-packages]: Handle vers= ion > specification in package name arguments. > (update-package): Add keyword-argument 'version' and pass it on to call= ed > functions. > (guix-refresh): When updating, pass the specified version (if any) to > update-package. > [package-list-without-versions, package-list-with-versions]: New functi= ons. [...] > (('argument . spec) > ;; Take either the specified version or the > ;; latest one. > - (specification->package spec)) > + (let* ((name version (package-name->name+versi= on spec))) > + (list (specification->package name) version)= )) That changes the semantics of =E2=80=98guix refresh=E2=80=99. Until now, = =E2=80=9Cguix refresh guile@2.0=E2=80=9D or =E2=80=9Cguix refresh -l guile@2.0=E2=80=9D would loo= k specifically at Guile 2.0. Now, =E2=80=9Cguix refresh -l guile@2.0=E2=80=9D would report d= ependents of Guile 3.0. So instead of reusing the version string that shows up here, I=E2=80=99d su= ggest adding a new command-line option, say -T/--target-version. The downside is that it wouldn=E2=80=99t work when multiple packages are specified on the command line. Another option would be to introduce special syntax, like an equal sign: guix refresh guile=3D3.0.4 guix refresh guile@2.0=3D2.0.8 For that we=E2=80=99d introduce a new =E2=80=98specification->package-updat= e=E2=80=99 that would return a record with two fields: the package to upgrade, and the target version. WDYT? > + (define (package-list-without-versions packages) > + (map (match-lambda > + ((package version) package) > + (package package)) > + packages)) > + > + (define (package-list-with-versions packages) > + (map (match-lambda > + ((package version) (list package version)) > + (package (list package #f))) > + packages)) I always find it a bad sign when one has to write specific list-fiddling procedures; usually it indicates we=E2=80=99re missing a record type or something. Ludo=E2=80=99.