From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oDpPAwiQK2e1ZgEAe85BDQ:P1 (envelope-from ) for ; Wed, 06 Nov 2024 15:49:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id oDpPAwiQK2e1ZgEAe85BDQ (envelope-from ) for ; Wed, 06 Nov 2024 16:49:28 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="Rl/bqvke"; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=bGFP5glB; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730908168; a=rsa-sha256; cv=none; b=i51M05U8wS+w8IkSnggT6ioZYsPtJhJ8dKbEb+bVF6Lh/pVO0v0SaxfKxs0KGbTbog4f/z pdKQASgOLnBJEk7usMxUKWcFbZUI5TSF+Jb53nlBNuetwzWQbHJ5w1OhX4rHILyE3MMeSE lIrqZWh1SwfNxBz2XsQwI10dN1vABLI5iz6y5zpKNUUbD9wB9FHx/Ln4s52fDF0qyq7v0Z r6xp/41+tjdW6iSvjo8G37b1iU3QaFCEhq9iguMf05dc/pJZ/5RXlqGSp7vHWGbvf6Eks1 AhEwbAm3ivPTlgd84o3h4eZKcHfxU6SdUtICJGGW3Hnqcy6fJNTfzHkYt8IaXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="Rl/bqvke"; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=bGFP5glB; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730908168; 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=s7jwbOT+waaqocvmJhYWHOWf00sLJfX1r2PpsJ3qMYI=; b=M3R/BNkCqje40EWEEYZzjtOHhtuKCofygjnVWeNC2F8Y5G3BoyIqyiK7e3C3SFOQDbGfNh N2k3g1WET35jex4Lq/iyrqmAD/1jFpJ0cL7ifQJnxWOJRoCkJ3vstMDS6rPbTmdznPIvyV EOTKcs+RjLOqn9eRWLNIYIZwpFVRfNUr571akg5a0G25fgLwQQ2+Pp8EQMl0H/1zngJdER Jp8oUCvFne+GWyKyzUpXvQF4kDk3CQDrcnVdaSmFG41PqsyNPld0WsQb47UjSrBEuXynof 1nPrKT9nv9Cvul+T1AUkK6TuNgzj+ZJX97jGcRFFaaiAqL1MMkRM+7eZj+K0cA== 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 3F23782921 for ; Wed, 06 Nov 2024 16:49:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8iHM-0000mP-Ly; Wed, 06 Nov 2024 10:49:09 -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 1t8iHG-0000lr-76 for guix-patches@gnu.org; Wed, 06 Nov 2024 10:49:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8iHF-0007Zy-VL for guix-patches@gnu.org; Wed, 06 Nov 2024 10:49:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=s7jwbOT+waaqocvmJhYWHOWf00sLJfX1r2PpsJ3qMYI=; b=Rl/bqvkeaW4eTPmnjJI6fowW/kxU5RTZLJ852olN6jbCPsBOU/ydrBhPfLflDOZxBJrfE+hSZG2IxP0bkNKAjWD3eqXv4/YCO1b2Yzq2fLMQYTUfLmuZtrTlq56uKONSGywZ+mGBEA4szh70I5P/6L3Xd5NvkhxWgUcQd3wIaIknju5WEc4qqqNQux0E7J91nn9nCWzyi/s1tDMDNgUygFcM2O17fUIgNyJqT1oAb2dAxWQcU9cX3gNDZInex5lmbpsj/XX1wb+vxJdsC3zbH5oFeDvRT53CEIpsTh6ibh3AWUBGu7l81Nwx4LY8znvg7Uews8DLFUL251yigRMfhw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t8iHF-0006d1-PU for guix-patches@gnu.org; Wed, 06 Nov 2024 10:49:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#73833] [PATCH v2 4/5] guix: refresh: Keep the version field of each update specification. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Nov 2024 15:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73833 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: 73833@debbugs.gnu.org Received: via spool by 73833-submit@debbugs.gnu.org id=B73833.173090808225411 (code B ref 73833); Wed, 06 Nov 2024 15:49:01 +0000 Received: (at 73833) by debbugs.gnu.org; 6 Nov 2024 15:48:02 +0000 Received: from localhost ([127.0.0.1]:45182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8iGI-0006bn-Bz for submit@debbugs.gnu.org; Wed, 06 Nov 2024 10:48:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t8iGG-0006bJ-W2 for 73833@debbugs.gnu.org; Wed, 06 Nov 2024 10:48:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t8iGA-0007SW-DD; Wed, 06 Nov 2024 10:47:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=s7jwbOT+waaqocvmJhYWHOWf00sLJfX1r2PpsJ3qMYI=; b=bGFP5glBwoM6RGdgWrqA BITSuHSAvmoe3tyLHSu1VKjEBeRG02qr3LaCqQ3WS4Fh8d4P2E4jTJMUnEwIvktGdBMk4Q3jy9Iqa lL8A8WDbOt7+/4QgV5VPaV/5+FmqEVrBkaRdOXWOF2fpKkO6cT525KGCMSPSGrz2B504wx95XGKMK 6bmDi8DjMGW0G/Ff6MbiHEzFGCwCI+4D8VCINEBvcVnjcqlnynn4zUW40tiQcaEdTedKCyOfUTmxI SODd+h+tZVfBpWQPGPAVry+u1lAG6TKD47nRpJ38gy/mHUGG5W1TslckBEv7fvArx/IWpLYB8SQVc MSGGi5gPpuE2Ig==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <20241017223308.27941-5-ngraves@ngraves.fr> (Nicolas Graves's message of "Fri, 18 Oct 2024 00:26:00 +0200") References: <20241017223308.27941-1-ngraves@ngraves.fr> <20241017223308.27941-5-ngraves@ngraves.fr> Date: Wed, 06 Nov 2024 16:47:51 +0100 Message-ID: <87msicwehk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.59 X-Spam-Score: -3.59 X-Migadu-Queue-Id: 3F23782921 X-Migadu-Scanner: mx10.migadu.com X-TUID: Judkksu6OMp+ Nicolas Graves skribis: > * guix/scripts/refresh.scm (options->update-specs)[update-specs]: Keep > the version field of each update specification. This is done using a > variable to cache package names and then filter out unwanted candidates. > --- > guix/scripts/refresh.scm | 23 +++++++++++++++++------ > 1 file changed, 17 insertions(+), 6 deletions(-) > > diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm > index ec7d38c22a..810c33c786 100644 > --- a/guix/scripts/refresh.scm > +++ b/guix/scripts/refresh.scm > @@ -310,12 +310,23 @@ (define update-specs > some))) >=20=20 > (if (assoc-ref opts 'recursive?) > - (mlet* %store-monad ((edges (node-edges %bag-node-type (all-packag= es))) > - (packages -> (node-transitive-edges > - (map update-spec-package update= -specs) > - edges))) > - ;; FIXME: The 'version' field of each update spec is lost. > - (return (map update-spec packages))) > + (mlet* %store-monad > + ((edges (node-edges %bag-node-type (all-packages))) > + (strict-spec-pkgs -> (map update-spec-package update-specs)) > + (strict-spec-pkg-names -> (map package-name strict-spec-pkgs)) > + (packages -> (node-transitive-edges strict-spec-pkgs edges)) > + (transitive-specs -> (map update-spec packages))) > + (return (append update-specs > + (filter-map (match-lambda > + ((? update? spec) > + (if (member (package-name > + (update-spec-package= spec)) > + strict-spec-pkg-names) > + spec > + #f)) > + (_ > + #f)) > + transitive-specs)))) Or just: (filter (lambda (spec) (member (package-name (update-spec-package spec)) package-names)) transitive-specs) (IIUC.) Maybe add a comment explaining that this is to retain the =E2=80=98version= =E2=80=99 field of UPDATE-SPECS? Also, check out the guidelines for identifiers. Thanks, Ludo=E2=80=99.