X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH] pull: allow filtering which channels to pull from the CLI Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN Resent-Date: Sat, 24 May 2025 17:14:02 +0000 Resent-Message-ID: <handler.78580.B.17481068247709 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78580 <at> debbugs.gnu.org Cc: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN X-Debbugs-Original-Xcc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.17481068247709 (code B ref -1); Sat, 24 May 2025 17:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2025 17:13:44 +0000 Received: from localhost ([127.0.0.1]:34871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uIsRI-000209-GZ for submit <at> debbugs.gnu.org; Sat, 24 May 2025 13:13:44 -0400 Received: from lists.gnu.org ([2001:470:142::17]:34238) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uIsRE-0001zn-RR for submit <at> debbugs.gnu.org; Sat, 24 May 2025 13:13:37 -0400 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 <sergio.pastorperez@HIDDEN>) id 1uIsR8-0000lh-DV for guix-patches@HIDDEN; Sat, 24 May 2025 13:13:30 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uIsR6-00060q-G6 for guix-patches@HIDDEN; Sat, 24 May 2025 13:13:30 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-443a787bd14so13616855e9.1 for <guix-patches@HIDDEN>; Sat, 24 May 2025 10:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748106806; x=1748711606; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Imlu4CdBW2wUCfYrPnDGzdbrN4qwm3qVLTEXQWtIBW0=; b=CQ+T9zHrTQHdnVwu5+ioc4wpVrkAtS7u5XN/iLDFs17+7Y0O6heK/32v6bG6kZPmQF mxfINqWATiXmJCrR3Pru+EP95bEZ7ZTgh3C2PwLDc9u3Uljryzsk75/1s0FKCXtJsR5M 4wmfwWHCB1hmWKHF3uYJHFHRzk30VGAPc8X0D+2/W6ml/iSUll7qoluvhazlrwNKXfm+ 1QYaaTsJZDnImKo19ZZdGTBOnVTflodDS9iCITGlF/ISL6YBpLzcLv1aSUn/jDxVPiT6 yNEhDMpbgYDDhpynOHSLLySDRNry+NKW5cfXs4OR0teB+v3MtR5+kgUhdfwJGtm3mpRH 02nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748106806; x=1748711606; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Imlu4CdBW2wUCfYrPnDGzdbrN4qwm3qVLTEXQWtIBW0=; b=IMXjIfqokAV+Zk9ttbgK85dGqG76uOCOzxV/2UPGsPqSmhoMLykYC9tnBA0AqMjM2l MaQEr01g/L3juHqnaOPR8NNHd9w8yxA2HuogtQ0ZK5oTEIYzoVP03/e4Fu7glnpphJhT 7uERTj31hA1PEW3ztH50qJfX3ONUVlssiHx36y5qScqs18fQutyMChaS1P7T+Jafe6xI Q9HJSh2SxE70+jUbuUo7UU+Y2BAwMfMS6K7UjHC69KdornykWMTpweJwF8aa4hDPAsaH gmlPfpUFKukILJnHicY13EiGPVk4UGdnXtMclVJ1wUll6We9qIbAyLQP3PTgYP+wagfs Tpew== X-Gm-Message-State: AOJu0YxkwIhbkLPEPAV9lG/+jeHJHZ2cKOcbgPLcTxUbcaLo3pp5MdsD w4/5DV3M49ylzT0fEMNrmGRnYTwIs4uT50EpySnJcrr9QbvoC4fol8hF/3wrmg== X-Gm-Gg: ASbGncvMSvbTJWAY72XeOHP1OLl7JaAP5ta9mAZPsrzCHPGwh8T8hHzmcHDzm2sVL3l QgeIcgRSi30eV4WmkjACd4LOuqiH/y4RKIPrtIO7gBOHN6IDbk74h/t0w1ukmhK0gk3pY6ipstg YZewPVSH01cIsF3TxAqjdBnoMVIINm8Q9ygnrpNRFYbZ/AMcd8wH4BnCaZU9sDhYWt0FiN01sCA m/AgIgO6bpW9fofBpr2ZyU5Z44p3w3YyNCUt3aMoCYBhK0S9+S4ErUKblDODR9hEjs+g7UuugUR HOxGcPH6WpkUyWyk7s+hKIrD6MUR8YmXNCDnOVIYuJLYbTpBKtEIG7WqQK+6Aec= X-Google-Smtp-Source: AGHT+IGRBv5mzLz+TaYIC1nSRw+nXQCFkeTb9sZHJGFEjNNNnanSWXXIZceGOmxHAyhjWTt4xpiDJw== X-Received: by 2002:a05:6000:3108:b0:3a3:6eb9:6064 with SMTP id ffacd0b85a97d-3a4c15087demr6723402f8f.17.1748106805857; Sat, 24 May 2025 10:13:25 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-442ebd46aa4sm251795235e9.1.2025.05.24.10.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 May 2025 10:13:25 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Date: Sat, 24 May 2025 19:12:35 +0200 Message-ID: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=sergio.pastorperez@HIDDEN; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * guix/scripts/pull.scm (guix-pull): treat non-prefix CLI arguments as a list of channels to pull. Change-Id: I5d08c4b1cc84ab58a9c4e7600eb86468f92d10f0 --- guix/scripts/pull.scm | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 76aed0b5cc..61a68b8d70 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -839,21 +839,41 @@ (define (validate-cache-directory-ownership) (define-command (guix-pull . args) (synopsis "pull the latest revision of Guix") - (define (no-arguments arg _) - (leave (G_ "~A: extraneous argument~%") arg)) + (define (filter-channels channels names) + "Filter CHANNELS whose name symbol is present in NAMES list. +If NAMES is an empty list, don't filter anything. Warn when a name is not +available in the channels list." + (if (null? names) + channels + (let ((available-names (map channel-name + channels))) + (for-each (lambda (name) + (unless (member name available-names) + (warning (G_ "Channel '~a' not present in channel list~%") + name))) + names) + (filter (lambda (ch) + (member (channel-name ch) + ;; A channel named guix must always be present. + (cons* 'guix names))) + channels)))) (with-error-handling (with-git-error-handling (let* ((opts (parse-command-line args %options - (list %default-options) - #:argument-handler no-arguments)) + (list %default-options))) (substitutes? (assoc-ref opts 'substitutes?)) (dry-run? (assoc-ref opts 'dry-run?)) (profile (or (assoc-ref opts 'profile) %current-profile)) (current-channels (profile-channels profile)) (validate-pull (assoc-ref opts 'validate-pull)) (authenticate? (assoc-ref opts 'authenticate-channels?)) - (verify-certificate? (assoc-ref opts 'verify-certificate?))) + (verify-certificate? (assoc-ref opts 'verify-certificate?)) + (selected-channels (filter-map + (match-lambda + (('argument . name) (string->symbol name)) + (_ #f)) + opts))) (cond ((assoc-ref opts 'query) (process-query opts profile)) @@ -877,7 +897,8 @@ (define-command (guix-pull . args) (ensure-default-profile) (honor-x509-certificates store) - (let* ((channels (channel-list opts)) + (let* ((channels (filter-channels (channel-list opts) + selected-channels)) (instances (latest-channel-instances store channels #:current-channels base-commit: 096dedd0bb13523002c814b001429c2f65b6f10d -- 2.49.0
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Subject: bug#78580: Acknowledgement ([PATCH] pull: allow filtering which channels to pull from the CLI) Message-ID: <handler.78580.B.17481068247709.ack <at> debbugs.gnu.org> References: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> X-Gnu-PR-Message: ack 78580 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 78580 <at> debbugs.gnu.org Date: Sat, 24 May 2025 17:14:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. As you requested using X-Debbugs-CC, your message was also forwarded to Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>,= Ludovic Court=C3=A8s <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, = Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@tobias= .gr> (after having been given a bug report number, if it did not have one). Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 78580 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 78580: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78580 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v2] pull: allow filtering which channels to pull from the CLI References: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> In-Reply-To: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: sergio.pastorperez@HIDDEN, guix@HIDDEN, gabriel@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, maxim.cournoyer@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN Resent-Date: Sat, 24 May 2025 21:24:02 +0000 Resent-Message-ID: <handler.78580.B78580.174812178732560 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78580 <at> debbugs.gnu.org Cc: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Christopher Baines <guix@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> X-Debbugs-Original-Xcc: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Christopher Baines <guix@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174812178732560 (code B ref 78580); Sat, 24 May 2025 21:24:02 +0000 Received: (at 78580) by debbugs.gnu.org; 24 May 2025 21:23:07 +0000 Received: from localhost ([127.0.0.1]:36868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uIwKg-0008T5-Jj for submit <at> debbugs.gnu.org; Sat, 24 May 2025 17:23:07 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:52712) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uIwKe-0008Ry-8e for 78580 <at> debbugs.gnu.org; Sat, 24 May 2025 17:23:04 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-442d146a1aaso11757185e9.1 for <78580 <at> debbugs.gnu.org>; Sat, 24 May 2025 14:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748121777; x=1748726577; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aawEU7QOFC+tmxP6JQHDDyu9x1YmCTSQcVdYtZJof98=; b=kdbaUaRQBIfv7TmcjRtV3nmStY9E7PTf6NMzZPvwCno/QZGA2eqDgKzw4R7ZEjXfX/ LkbM8GTSXuIlqIpfbMPWsGa7vI5TpDm2rGc6etU4hJT5jXL8RibG4utUTa/GblDKuU+9 mzLFeJ2plAsIy4UhZd0QsbK/9M4bnIrkOJ2tyDpoVMgVNxsAZYUfe7V2oKu9KjW6abZG UcLc7BvXkfU2SDooKJDBhF+2QCwZ1NBx1IgbasQBCrCnjYvevKTAUMM4Dg/sMTdV3am8 7v+kYGlletxzoJCuDJvWWigzjPVXdMVCiLfkt1FjU2cicOJOO2xBkx6YKh0TXzPEFBy6 Go5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748121777; x=1748726577; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aawEU7QOFC+tmxP6JQHDDyu9x1YmCTSQcVdYtZJof98=; b=pN9/ZY3pUFH3Y5zgc5B9yQOz/8w48pIvL5KdzfnYKhN8bvsfDwATWbFJCoNwW1BTLD 7BBywjj8mEvMJ1YtBUqNrK3PVnmY1aVTWjUYEOoiYJRaGOrybzZ84CrOWwrzR7zPHFyZ INfI8jF0VHFPtkzWmVKJ0ShJ5QZjJ3XpXnhpG3wT7fDcjp5hDAczIF4iasuWVsey0mYx 1GKzBPtIbjJm4Pqg0RdXp43I0nPKyvBXST1/Tv5EglVgKVgfYJ1sfcosQcUiTEPwXv8Q KpO9d1eBDNvYGknb6egZGZEn72iOrP1czg2n7wN3ef0JmJISptL/emK57M0sKLMp72xO XSRw== X-Gm-Message-State: AOJu0Yxu/w6uwgh8JyKGR+xsV67z+wrdyDNd+SUEgaCD1GMtU9i1XyU4 GHCHg2LBwn9uG5lvz+NRE6cQmtJZp8030eqwFgj9d7f4oDTC32/VXwdt8MTN5A== X-Gm-Gg: ASbGncu5ymFe0lXt5fYYu4lxkxknK4Oq/OqDJVhdFpqCRJznD9KAqPvg057GcFpNQBi lAhA6YmL87B71PHCj7+1eJ6pYNVqqSBgdHBzNeuvo32kn08Or7qnRZ2o4ktVu0qzf19WcHTQ6ZM x3XQZZNOIm9YrZ/K879sLNa3P1e8+T4VHdq5E2I6lKbNGahPcnSYRg2RcH0RrO1UsZXA9aswqg6 9/WfYI2wIDgzRoWkqkhdTW2E6WmTuu+DV9lEh5Lis+0Bj8F7EIUBNNnrEU4FavzcHwujGwFgu7Q 92x5bbHcC/+qUbh74CweMOOeQAMU8mKYVD+qsOfstgJcRTuJTOmjT5jK6o3wo+Xo0niquw8bNQ= = X-Google-Smtp-Source: AGHT+IEVWdwJL/B6PXawvAK0HAr4O75Rtv+demGOJF7gPH9rT6mSAmRJ7ZiQb0jQiTUmgAqUTH+Tdw== X-Received: by 2002:a05:600c:1385:b0:43d:3df:42d8 with SMTP id 5b1f17b1804b1-44c93da7c08mr28789665e9.6.1748121777338; Sat, 24 May 2025 14:22:57 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca4d263sm30140420f8f.3.2025.05.24.14.22.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 May 2025 14:22:56 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Date: Sat, 24 May 2025 23:22:01 +0200 Message-ID: <24f41b12012dc5551391f516b8dc3088563db9b5.1748121721.git.sergio.pastorperez@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * guix/scripts/pull.scm (guix-pull): treat non-prefix CLI arguments as a list of channels to pull. Change-Id: I5d08c4b1cc84ab58a9c4e7600eb86468f92d10f0 --- doc/guix.texi | 11 +++++++++-- guix/scripts/pull.scm | 42 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e4e2b853f1..e3de7ce47b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4656,8 +4656,15 @@ Invoking guix pull deleting /var/guix/profiles/per-user/charlie/current-guix-1-link @end example -The @command{guix pull} command is usually invoked with no arguments, -but it supports the following options: +The general syntax is: + +@example +guix pull [@var{options}] [@var{CHANNELS}@dots{}] +@end example + +The optional @var{channels} argument filters the list of pulled channels +to those whose names match the given list. The channel named @dfn{guix} +is always pulled. @table @code @item --url=@var{url} diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 76aed0b5cc..677df965bb 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -81,8 +81,13 @@ (define %default-options (validate-pull . ,ensure-forward-channel-update))) (define (show-help) - (display (G_ "Usage: guix pull [OPTION]... -Download and deploy the latest version of Guix.\n")) + (display (G_ "Usage: guix pull [OPTION]... [CHANNELS...] +Download and deploy the latest version of Guix. + +If CHANNELS are specified, pull only from channels with those names (e.g.: +'guix pull rde nonguix' pulls only from the 'guix', 'rde', and 'nonguix' +channels as defined in your channel configuration). +The channel named 'guix' is always pulled.\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) (display (G_ " @@ -839,21 +844,41 @@ (define (validate-cache-directory-ownership) (define-command (guix-pull . args) (synopsis "pull the latest revision of Guix") - (define (no-arguments arg _) - (leave (G_ "~A: extraneous argument~%") arg)) + (define (filter-channels channels names) + "Filter CHANNELS whose name symbol is present in NAMES list. +If NAMES is an empty list, don't filter anything. Warn when a name is not +available in the channels list." + (if (null? names) + channels + (let ((available-names (map channel-name + channels))) + (for-each (lambda (name) + (unless (member name available-names) + (warning (G_ "Channel '~a' not present in channel list~%") + name))) + names) + (filter (lambda (ch) + (member (channel-name ch) + ;; A channel named guix must always be present. + (cons* 'guix names))) + channels)))) (with-error-handling (with-git-error-handling (let* ((opts (parse-command-line args %options - (list %default-options) - #:argument-handler no-arguments)) + (list %default-options))) (substitutes? (assoc-ref opts 'substitutes?)) (dry-run? (assoc-ref opts 'dry-run?)) (profile (or (assoc-ref opts 'profile) %current-profile)) (current-channels (profile-channels profile)) (validate-pull (assoc-ref opts 'validate-pull)) (authenticate? (assoc-ref opts 'authenticate-channels?)) - (verify-certificate? (assoc-ref opts 'verify-certificate?))) + (verify-certificate? (assoc-ref opts 'verify-certificate?)) + (selected-channels (filter-map + (match-lambda + (('argument . name) (string->symbol name)) + (_ #f)) + opts))) (cond ((assoc-ref opts 'query) (process-query opts profile)) @@ -877,7 +902,8 @@ (define-command (guix-pull . args) (ensure-default-profile) (honor-x509-certificates store) - (let* ((channels (channel-list opts)) + (let* ((channels (filter-channels (channel-list opts) + selected-channels)) (instances (latest-channel-instances store channels #:current-channels base-commit: 096dedd0bb13523002c814b001429c2f65b6f10d -- 2.49.0
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v2] pull: allow filtering which channels to pull from the CLI References: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> In-Reply-To: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> Resent-From: Sergey Trofimov <sarg@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 07:07:02 +0000 Resent-Message-ID: <handler.78580.B78580.174815679214709 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174815679214709 (code B ref 78580); Sun, 25 May 2025 07:07:02 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 07:06:32 +0000 Received: from localhost ([127.0.0.1]:41496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ5RI-0003pA-6T for submit <at> debbugs.gnu.org; Sun, 25 May 2025 03:06:32 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:55354) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uJ5RE-0003oT-Qg for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 03:06:29 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3a36e0d22c1so825045f8f.2 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 00:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1748156782; x=1748761582; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eJJCm7SKZU29wHYRLea0g0OPCs2f3fuHAuus/TC/TDo=; b=lj0RUsMTtFUyXP857D8r8Gs2em65kW6zSNXt56dAVYx30FSH7eCy+jbfluxQIwfRX4 +e/4+8+683u6Ab4guScKEMb0ZO7v2L7RRMumlodFBx+YXf4m4dQUcB8AvWnJWw0k8Kqw ucvtbtNJPzQ0iAEmjQex0GXFliTYC9eiwZyB2IlmWbKKHgkx8IKhNMexBasE+xzZx/cf Yv3+O0NDwDZi70f7TtSUbCuYpfj2mbJ6B1+XubEw4aywGe1/n0G98TXBj3Hw84fe2s8R IKzd72/W4qSNlTzB1wJIYR+oqb3llYMCzhRWBRMht/Ph6yBBI2eo+ODW/83O04WeJ7ix XrFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748156782; x=1748761582; h=content-transfer-encoding:mime-version:message-id:date:user-agent :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eJJCm7SKZU29wHYRLea0g0OPCs2f3fuHAuus/TC/TDo=; b=kdh6BuZRzTrkqZCWjDXieLBRwPpDdMh39ALJMcwUwuDyG2zJ+RtG8d9EckPtd7nWrb DAzT6b+IbKkU2OSXobQjM5z3JoCi+tvOuWf8n/IiJ+ZEmhcjIYlbAL0Vn8Fw/j9h+VHf NYB9duGWL/XWZYIjkkvRiTebLmeQoUxugdnLHT7QmCR/d2Bq+flB9AJcUeuBH0rC3IR4 nksMjzpa8ux6oOQFqKuORSZ9RdH4M6LSxtxGJIzFFUiHQGrNpLtkPGEa19SbfN58QKEO 1r6FYuIu9zZi44eBwW6j+TtBES0cgx7jTXJLZVBOlmJdYHUTA1waj9o1Xr8My82Fk2um O3uA== X-Gm-Message-State: AOJu0Yy7jlohQcl7YN1ghcoeK52BAUcU1PV589utAk8fIF+qBeH0pgoc n1kTQqgEAQy7HWqRzOr2TUY8dn7ZBWI8pwyICR5TVXZx6G4Wt8Q76pmCbi7rj50OIA0= X-Gm-Gg: ASbGncuqD6yaaI4ZZDaFYh5RrrwUFatFOljVoh0UTaHi0Si9+tdIEyhKKQwEuFbh1gd OWcYAQzCdgDwFeIREchYZK02tzSnEVYCtlTZkY9aYl8OmJx3QRgsmRhh2joRUh0B4Hv2n3L0WQS 8pl9GMcvbJXXdwN9hW4dr+92QQRAyZ9sP+t3eJPdaidsknl3KP/yAMNsWnLIA7PNvIrDRy9Odd+ /Tsubi4NFggZO7jDUmdegw7JEvZmfjy3QLGDGE9Sk+9RZVxIlA/N81yB04KJ+3oDDVuRnKLt58Q YOXQniLTP08fChCposWrvlzT04vZ69eMxuGLut+jCJsejXV2 X-Google-Smtp-Source: AGHT+IFsGgHsG1l86hqLRNQX1V1sGuXDrCcAU6AyTERlbjyKYP659Nqu/j241OKi5lWlNa7LMVUPDQ== X-Received: by 2002:a5d:64c6:0:b0:3a1:f72a:8948 with SMTP id ffacd0b85a97d-3a4cb4086b1mr3899201f8f.9.1748156782042; Sun, 25 May 2025 00:06:22 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-447f7bae847sm194089775e9.36.2025.05.25.00.06.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 00:06:21 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> User-Agent: mu4e 1.12.11; emacs 30.0.92 Date: Sun, 25 May 2025 09:06:20 +0200 Message-ID: <87r00d185v.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Sergio, Sergio Pastor Pérez <sergio.pastorperez@HIDDEN> writes: > * guix/scripts/pull.scm (guix-pull): treat non-prefix CLI arguments as a list > of channels to pull. > > Change-Id: I5d08c4b1cc84ab58a9c4e7600eb86468f92d10f0 > --- > doc/guix.texi | 11 +++++++++-- > guix/scripts/pull.scm | 42 ++++++++++++++++++++++++++++++++++-------- > 2 files changed, 43 insertions(+), 10 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index e4e2b853f1..e3de7ce47b 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -4656,8 +4656,15 @@ Invoking guix pull > deleting /var/guix/profiles/per-user/charlie/current-guix-1-link > @end example > > -The @command{guix pull} command is usually invoked with no arguments, > -but it supports the following options: > +The general syntax is: > + > +@example > +guix pull [@var{options}] [@var{CHANNELS}@dots{}] > +@end example > + > +The optional @var{channels} argument filters the list of pulled channels > +to those whose names match the given list. The channel named @dfn{guix} > +is always pulled. > wouldn't it be better to let user decide whether `guix` channel has to be pulled? The use-case is simple - I've made a change in my personal channel and I want to apply it without risking to build missing / download new substitutes of the main channel.
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v2] pull: allow filtering which channels to pull from the CLI Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 07:23:01 +0000 Resent-Message-ID: <handler.78580.B78580.174815774019459 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergey Trofimov <sarg@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174815774019459 (code B ref 78580); Sun, 25 May 2025 07:23:01 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 07:22:20 +0000 Received: from localhost ([127.0.0.1]:41639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ5gZ-00053k-JN for submit <at> debbugs.gnu.org; Sun, 25 May 2025 03:22:19 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:52316) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uJ5gX-00053M-HS for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 03:22:18 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-440685d6afcso15778725e9.0 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 00:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748157731; x=1748762531; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=+MECqRBnzlOYuTaa/JriQThR9EU6pio8iJ8+w6CKCvU=; b=k56OjMdTPaOF17bvFnuiBEWNFNmZMQeKFshIPJ1lVQW7udCj3vs1yG8vKSgI+EqBLh UFtESQ9dU0MuUDt8b9AZhSnkWb/6XVP3gZbHOZHJqwoObATSfTilcpNjzczgsgmaOmLN TI1l9CPiShJwAS7h0d6bkS1FnI5IIDwh4+MBogqR9ef7YzFTlsYwXBr8871NBDqNntAY 8KRcCWaICt6XLXn6+Vv4leDglQOnUPPWUtfJByoI+RwowTq2Qy1T7Vu1dCbaPFPjg5HY 0xBYXaArfExmqmJopj4DBr/KEmkRg1ZtH1ZX78gwYp8a1r9Z93j3OFoe3uam0Vbod4J7 8VQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748157731; x=1748762531; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+MECqRBnzlOYuTaa/JriQThR9EU6pio8iJ8+w6CKCvU=; b=f4BgxITW6dg2D+T6Gxboss+earvdGTymPqgJP4n3X9oaR80A9DazVzT5xx1XCrsD7g QFyOWFVUa0Z8oEFDSDx8XgifG2cwTopWLWrmb704JCexwaIZ5V9HQ9Iw74ylOlCC0V/h fr6vl0Q/QvYz3Eg+w6xCnUzY7VztajLeOsNqCJNVKKVAOtkCmp516Yk4Et60zhsvpOoW vRfwuJAMeQz+ZRO8EwZ/N+QlMYyaDL4d1aojjnA/4jBm1oaUgm01CcKyRC3Wa/mXLk7R uj1OjK6ABJMjJIggby28UoNQrRZNEhPEcksvfOB7JRcqH7GdSs9zk41fgT1k3lsuxxmS QtXQ== X-Gm-Message-State: AOJu0YzCh7Imw8QKrMQa1Z5b4AUcD5miwyWbBG9jAXzrv4GBpK0fb/y5 ZDF5oPp1qU45jOqc3jETgT4V8fsiRMFdL/wDr+SyHqZzgQZh5v+LoeoG X-Gm-Gg: ASbGncuh9ACS7zJ/fHvuOLAsJxmLdyhOqwjW+8tSa2kMAakFQxMYhRvt7AWl9hUbUzl D26Shnu+yPoOLhd9DVuBZX8lci+WFD4W1dCF8ic9w+CHAA0ChRzRyCMSAt6zVBdg5bbRsSk8jjH 7hAG2J/DJRDyVwI990UmqvMM2RXffcsxBY70ExohujuTW0bsMs6TfnrCLUksmCw0w2JfENcVKbl Ha2V1wnh9bJZYdV1nKiAyqvBuViJjRIPJ25d3ILzdis+ti0BoqzxMVr9bsJIjB47BC/YLcNXm+u uUO9F2Mb70/NcsTS3T9QBQNXsACQLqiwm7CzZ7R5lH6SqxSFTiKuo2vWzmwT5Js= X-Google-Smtp-Source: AGHT+IGcg/s6/7Pjj3mrYyO8mHVxY7Cg9WFdWiFZ45U0VYKDVv577zfavX1Nm8ZkfL2WRtl9CPHDJw== X-Received: by 2002:a05:600c:190d:b0:442:ffb1:b58 with SMTP id 5b1f17b1804b1-44c9427f43emr38548655e9.12.1748157730869; Sun, 25 May 2025 00:22:10 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a37fb452e5sm13853123f8f.20.2025.05.25.00.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 00:22:10 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> In-Reply-To: <87r00d185v.fsf@HIDDEN> References: <87r00d185v.fsf@HIDDEN> Date: Sun, 25 May 2025 09:22:09 +0200 Message-ID: <87cybx5f4u.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello Sergey. Sergey Trofimov <sarg@HIDDEN> writes: >> +The optional @var{channels} argument filters the list of pulled channels >> +to those whose names match the given list. The channel named @dfn{guix} >> +is always pulled. >> > > wouldn't it be better to let user decide whether `guix` channel has to > be pulled? The use-case is simple - I've made a change in my personal > channel and I want to apply it without risking to build missing / > download new substitutes of the main channel. Unfortunately this is not possible. That was my initial idea as well, but the `guix' channel is required. If you allow it to compose the list of channels to pull without the `guix' channel, you get this error: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix pull rde Updating channel 'rde' from Git repository at 'https://git.sr.ht/~abcdw/rde'... Building from this channel: rde https://git.sr.ht/~abcdw/rde bf8f628 /home/pastor/projects/guix/puntos/dots/.config/guix/channels.scm:12:6: error: 'guix' channel is lacking hint: Make sure your list of channels contains one channel named `guix' providing the core of Guix. --8<---------------cut here---------------end--------------->8--- Once thing we could do, is to pin the Guix channel to the current commit so it does not pull. I can try to implement that if you would like to have that behaviour.
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v2] pull: allow filtering which channels to pull from the CLI Resent-From: Sergey Trofimov <sarg@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 07:31:02 +0000 Resent-Message-ID: <handler.78580.B78580.174815825722259 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174815825722259 (code B ref 78580); Sun, 25 May 2025 07:31:02 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 07:30:57 +0000 Received: from localhost ([127.0.0.1]:41713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ5ov-0005mw-BR for submit <at> debbugs.gnu.org; Sun, 25 May 2025 03:30:57 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:55437) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uJ5ot-0005mR-0a for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 03:30:55 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3a36e0d22c1so834049f8f.2 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 00:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1748158249; x=1748763049; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pCmytG16TWVRrW6iUdYxvnS8q7GL6V0GUNiMbWuIzfg=; b=gmelf9A+yhQ2VamHlI04b3NmespHWKURQtvzK7ogsKZmXGWg/0WI1vD5oziymeyNCI ETfT2FGWpuXkTOT83N6IfZfKg8XB1/dml4DEkaCveS9+r8IV38H1q6bKDJML+Np/f4Yx uTBK4Jn0EsdF7ZcKpVfDGis23kY+ZWCCoXoUokb9vGodmdU7Em5jNuMo2cCD7+fER/WD P1kQjs+g8SBOpVAzQzpilEHxPiatA7nAVcwuhUKpuzJnKDi5cJp967jSzQS2MGJEa0Wy oMiSY/P+V9ua4NGlpQUcpvGfznJ+sda3tyqjCeemvKRI3DulO9voYXtc/jMqxhMLC4AQ rklQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748158249; x=1748763049; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pCmytG16TWVRrW6iUdYxvnS8q7GL6V0GUNiMbWuIzfg=; b=FUIkg94B/DNfM1D4Jgn14MZhxPnM1C340K0au18PNhruCioYJmSbJrZF4IERrLEAvw UvrqWVcdbtb3bxJsXPgHnciCLp2wSSO4gbChbkwyRHRFiEA9fABIXlXZan0+JKfOwDGY Y4Wh8l+gcYwlNya839P+RJoyEpHh9KhzGfB95tHwxprjG5hIwnYJtaI2y9nog4nLwtoU O1i6UjSgxyN58lurrLixziPzSerU8JwgyPJ4sBC94XRvOrYUJ4NxCzXMXbQqRCTRvxaS smB9SbR/9P8nepMe4Gm3rpzWy9zTTdFP0ciUj4wTiRLeY2ql0c6zmlBLyXSsp6iupzXm 9l/Q== X-Gm-Message-State: AOJu0YxitWVboep/dcEEHjFctKs4HT5VmH0ug9WsdBaV38w9wESV+CNf wZb5904xHvJ+CePwIqXUEfHtQ5cNSYTN+IvFDydkmpLwuv6d4u+nQlKOKQ9mKluqhEI= X-Gm-Gg: ASbGncvr6/N//rponL78giSoUpQI8reqkvI6D8Zdtr+vC63dLSNjmFUr1XsqttDWemx 5PbLoKVg6vRZvU8QTniQ3rFaKHOmd5flvHMO1PXs/7U1/5FqtRvcNSDHhFECY8dLaRZd8wPm4TL ZOrR49BPTxMUr1uU0s4af50qI0+6A7Qx5uVU9bczDkZ36T5/fF4FMzgE98yMHK6EkS2nUj9HDKa aE++HiL+o5xXzbm12/LHpXQRYp0cVSr0MdPqGrieS0lO8nHxSbbhazVxcu5atcCZQkjF4qnOklu Kq7X8bK4lqi4NceDW8iEwbuzaii3m1N3MFVwjM/iKq06btL80VkcdRSpbXyui2GPm3m+MNUxvTA VCor+ij5slpwZ9QWBptM= X-Google-Smtp-Source: AGHT+IHDlce3hsSkfYddiZNMbCDEP54I/UbtlZ7v4dQR3FBHabHEzeKvbuxkih+H/1HrrDFFzqzUxA== X-Received: by 2002:a5d:584f:0:b0:3a4:d6aa:1277 with SMTP id ffacd0b85a97d-3a4d6aa16f5mr498154f8f.37.1748158248853; Sun, 25 May 2025 00:30:48 -0700 (PDT) Received: from localhost (static.210.80.180.157.clients.your-server.de. [157.180.80.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-447f6f04334sm195380325e9.10.2025.05.25.00.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 00:30:48 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> In-Reply-To: <87cybx5f4u.fsf@HIDDEN> ("Sergio Pastor =?UTF-8?Q?P=C3=A9rez?="'s message of "Sun, 25 May 2025 09:22:09 +0200") References: <87r00d185v.fsf@HIDDEN> <87cybx5f4u.fsf@HIDDEN> User-Agent: mu4e 1.12.11; emacs 30.0.92 Date: Sun, 25 May 2025 09:30:46 +0200 Message-ID: <87ldql1715.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Sergio, Sergio Pastor Pérez <sergio.pastorperez@HIDDEN> writes: > Hello Sergey. > > Sergey Trofimov <sarg@HIDDEN> writes: >>> +The optional @var{channels} argument filters the list of pulled channels >>> +to those whose names match the given list. The channel named @dfn{guix} >>> +is always pulled. >>> >> >> wouldn't it be better to let user decide whether `guix` channel has to >> be pulled? The use-case is simple - I've made a change in my personal >> channel and I want to apply it without risking to build missing / >> download new substitutes of the main channel. > > Unfortunately this is not possible. That was my initial idea as well, > but the `guix' channel is required. If you allow it to compose the list > of channels to pull without the `guix' channel, you get this error: > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix pull rde > Updating channel 'rde' from Git repository at 'https://git.sr.ht/~abcdw/rde'... > Building from this channel: > rde https://git.sr.ht/~abcdw/rde bf8f628 > /home/pastor/projects/guix/puntos/dots/.config/guix/channels.scm:12:6: error: 'guix' channel is lacking > hint: Make sure your list of channels contains one channel named `guix' providing the core of Guix. > --8<---------------cut here---------------end--------------->8--- > > Once thing we could do, is to pin the Guix channel to the current commit > so it does not pull. I can try to implement that if you would like to > have that behaviour. It'd be nice, otherwise one would need to use `--commit=$(guix describe ...)` which might work, but is not that user friendly.
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v3] pull: allow filtering which channels to pull from the CLI References: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> In-Reply-To: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: sergio.pastorperez@HIDDEN, sarg@HIDDEN, guix@HIDDEN, gabriel@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, maxim.cournoyer@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 08:21:01 +0000 Resent-Message-ID: <handler.78580.B78580.17481612594174 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78580 <at> debbugs.gnu.org Cc: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Sergey Trofimov <sarg@HIDDEN>, Christopher Baines <guix@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> X-Debbugs-Original-Xcc: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Sergey Trofimov <sarg@HIDDEN>, Christopher Baines <guix@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.17481612594174 (code B ref 78580); Sun, 25 May 2025 08:21:01 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 08:20:59 +0000 Received: from localhost ([127.0.0.1]:42052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ6bK-00015G-L2 for submit <at> debbugs.gnu.org; Sun, 25 May 2025 04:20:59 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:44437) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uJ6bI-00014q-Eo for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 04:20:57 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3a4d33f971aso324837f8f.1 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 01:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748161250; x=1748766050; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JvcG4Jt6cMIGek6CbOx41UmNOZ9Qk+85DJUfY4oKVsM=; b=DCx0hR4wxVL562BSNvZrLiOSNmjruiH4484TuyeynfrJaT2ewn5AoJb/CsNrQB2yKW 1plMVUKnhuovAvq8dnwLkgJ20EZ5/xkJxRHVgq4Al77qVyjK3tvscZQSD9XcbrKPU9dq iCKOVK7mAp7DfiFUs0YfhS3g/wXD+iEGGUdT2TuFnzyVemyVIkoVYpUr1trdqEgUeyGM sv1ukzy93cO9RkVrh9ojR/dpjXvO0eg+45qBZswqUtih1XdW2oXh8NwV/kLgsc46U5Jd BR7Hl9W66Jfp+yjW5P6mWuXXqcBEObY67HZhd+4su2D5Q5P/kmVnu2dfaxtrgufGWKEq XsSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748161250; x=1748766050; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JvcG4Jt6cMIGek6CbOx41UmNOZ9Qk+85DJUfY4oKVsM=; b=icpdTUgVQ5Lf1K/f1IxN+FYNVr8BKyG+bBFC2cU5pz8TOxtZu5Q7XehxKq7tVIoN/V GtzIT50k2/gp+uiO4Kf1vUyQeGpicJ3OcbtD8ltSf0hesKvxJ1H2KAZeq98h2phExsqY b2mrRn9MocmUckwoIwXNVuugOHMFvifsYVStx3jYi7e9lY/ibeMSiIHOcSg4b8TfZ0kB ZkozIayvZB0pqP1Ya5XZl+RkC7lzJRxmMmGiGfBJIZZwfsiQDUwVwrEl6XatPLcqCdvc LKxU4xwdjeuGH5PEdQuiPBEfJrmhrTx9c42ihiyrEn45SrokA18xYJ4YFzbtg8bJoaNp gd9g== X-Gm-Message-State: AOJu0YyXHsGqxvUJGz4MOLM4z5YPaVq1AgWst4NxysdVMGEBo8gK8w1R L9zCRUTepohNpXJPGeeaReOmGfBig3hAEXETy+4ashfw5gXS3BAEy2WicEf/P0Ce X-Gm-Gg: ASbGncuf3OicaFFK5qHbueND58D6/YqoZ4kiMT1nvmMUKkFbMXiBaGGbmkNDWqj4g08 rvOmraczJZr7ETJPwqCIoEBHHwgg9IDORbtFj6rfInJf6BlWKKn5YhIy75wdyMJBEQrKmwnRWab AljQ4VUaTNflf262KEyN3aYf8sYq8J/vZYdGoVrDhSLTCYitWL63A91u3hX5Fxvk+yDSS86PoO3 sKWtoxdpa4YArWiybS61OD7olhN7JGhiM9DU4T3E2jeJDaRU0Tc1LtVunoq6EBDxBk2+YgQ16OZ Tlx2scL7xQFhXw2iyF9dYx/3lyZh9W8vrRK5phfCP5AzB93CA/JLIu5mub8FmVbMRZ6daCt9Mg= = X-Google-Smtp-Source: AGHT+IG1ekIwOSexz2NwNEZzwcGiGPXI+fRFALTbVbmeO6Ku4KEQTqzo9fFztQaFnEFZMnE4Q88y6g== X-Received: by 2002:a05:6000:2f88:b0:3a4:d0c7:312b with SMTP id ffacd0b85a97d-3a4d0c73a6emr2689866f8f.26.1748161249614; Sun, 25 May 2025 01:20:49 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-442ffaa75cfsm191064265e9.1.2025.05.25.01.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 01:20:49 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Date: Sun, 25 May 2025 10:20:17 +0200 Message-ID: <73fbe44376bf6ce0957da5069cb5f27ef4fb9839.1748161217.git.sergio.pastorperez@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * guix/scripts/pull.scm (guix-pull): treat non-prefix CLI arguments as a list of channels to pull. Change-Id: I5d08c4b1cc84ab58a9c4e7600eb86468f92d10f0 --- doc/guix.texi | 10 +++++++-- guix/scripts/pull.scm | 52 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 52 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e4e2b853f1..26f16cfa7a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4656,8 +4656,14 @@ Invoking guix pull deleting /var/guix/profiles/per-user/charlie/current-guix-1-link @end example -The @command{guix pull} command is usually invoked with no arguments, -but it supports the following options: +The general syntax is: + +@example +guix pull [@var{options}] [@var{CHANNELS}@dots{}] +@end example + +The optional @var{channels} argument filters the list of pulled channels +to those whose names match the given list. @table @code @item --url=@var{url} diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 76aed0b5cc..8da7ec7ac4 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -81,8 +81,12 @@ (define %default-options (validate-pull . ,ensure-forward-channel-update))) (define (show-help) - (display (G_ "Usage: guix pull [OPTION]... -Download and deploy the latest version of Guix.\n")) + (display (G_ "Usage: guix pull [OPTION]... [CHANNELS...] +Download and deploy the latest version of Guix. + +If CHANNELS are specified, pull only from channels with those names (e.g.: +'guix pull rde nonguix' pulls only from the 'guix', 'rde', and 'nonguix' +channels as defined in your channel configuration).\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) (display (G_ " @@ -839,21 +843,51 @@ (define (validate-cache-directory-ownership) (define-command (guix-pull . args) (synopsis "pull the latest revision of Guix") - (define (no-arguments arg _) - (leave (G_ "~A: extraneous argument~%") arg)) + (define (filter-channels channels current-channels names) + "Filter CHANNELS whose name symbol is present in NAMES list. +If NAMES is an empty list, don't filter anything. Warn when a name is not +available in the channels list." + (if (null? names) + channels + (let ((available-names (map channel-name + channels))) + (for-each (lambda (name) + (unless (member name available-names) + (warning (G_ "Channel '~a' not present in channel list~%") + name))) + names) + (let ((program (car (command-line))) + (current-guix (find (lambda (ch) + (eq? (channel-name ch) 'guix)) + current-channels)) + (selected-channels (filter (lambda (ch) + (member (channel-name ch) + names)) + channels))) + ;; The guix channel must always be present. + (if (member 'guix names) + ;; If the guix channel is selected, let it pull. + selected-channels + ;; If the guix channel is not, pin it. + (cons* current-guix + selected-channels)))))) (with-error-handling (with-git-error-handling (let* ((opts (parse-command-line args %options - (list %default-options) - #:argument-handler no-arguments)) + (list %default-options))) (substitutes? (assoc-ref opts 'substitutes?)) (dry-run? (assoc-ref opts 'dry-run?)) (profile (or (assoc-ref opts 'profile) %current-profile)) (current-channels (profile-channels profile)) (validate-pull (assoc-ref opts 'validate-pull)) (authenticate? (assoc-ref opts 'authenticate-channels?)) - (verify-certificate? (assoc-ref opts 'verify-certificate?))) + (verify-certificate? (assoc-ref opts 'verify-certificate?)) + (selected-channels (filter-map + (match-lambda + (('argument . name) (string->symbol name)) + (_ #f)) + opts))) (cond ((assoc-ref opts 'query) (process-query opts profile)) @@ -877,7 +911,9 @@ (define-command (guix-pull . args) (ensure-default-profile) (honor-x509-certificates store) - (let* ((channels (channel-list opts)) + (let* ((channels (filter-channels (channel-list opts) + current-channels + selected-channels)) (instances (latest-channel-instances store channels #:current-channels base-commit: 096dedd0bb13523002c814b001429c2f65b6f10d -- 2.49.0
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v2] pull: allow filtering which channels to pull from the CLI Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 08:24:01 +0000 Resent-Message-ID: <handler.78580.B78580.17481614144819 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergey Trofimov <sarg@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.17481614144819 (code B ref 78580); Sun, 25 May 2025 08:24:01 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 08:23:34 +0000 Received: from localhost ([127.0.0.1]:42075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ6dp-0001Fc-Qv for submit <at> debbugs.gnu.org; Sun, 25 May 2025 04:23:34 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:60497) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uJ6dn-0001FD-8J for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 04:23:31 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3a375d758a0so1136165f8f.0 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 01:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748161405; x=1748766205; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=JwPiM1YuKvKCtk3R3SJqViwaFpOzxH8A1ZlLsGD9YFc=; b=CkX5OoWpiIn5jTPi1uK7wsihQhPdXdgvgKAEXCtKA6elOi6+70KFqarvzwWGESS3/M JFk/cu/iAw3qbFoyGtLCBBMUeSmDFdw/NyCsXy10cSfgxB9biAu1CYf6mGz+w0T5AYp0 4kQlCcuWKXveKDMpnvSRef/GtPmfO3GKDRBZLoIt0xWf6bsYQX0L2oNS7B+O2I/92eR5 GYrgYKdeolMVDWBHMw6MZAJWzYCYK18MC12viggn7itVWQIIDP6Lt0sDq9c+xSRwN85V xvFgBgyF2wILUmH/m6Fbzi+6C5bHK0jRXgtpmOkuJKd3G80ZK6SSTqJWrvLR63ENe8+G ce1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748161405; x=1748766205; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JwPiM1YuKvKCtk3R3SJqViwaFpOzxH8A1ZlLsGD9YFc=; b=lAMoqXgszljZW2Keah0iJMKrtVqwC7Hp2ht/JrWRP2USfRysrnp2J3W1OcNzKwqWzl VgkXzR8XUtevYMeWJvag5ub+cwOuKYaCIb9CpMkQ7K0iLV4iM6G5XrQAx/Iu5fUXpCWT VgmC8CQWw40q2ML4LQbfzo+b4qXOOMT3lXISP7BpFeqlmEGz1HjqyBXYwoIPVVbui0OP ULQD5xX/upxuWE7sR6gvIRHnarDEtx5MwkqGSntqdbGUrHzRTbBa87GPhPnANsxjau8f EW+RXFZ0mDmlNfSoSjNzPBQfxX13uc9MZpuHuewZSfnpWonQrk0yI7libBkWTtrGBYS3 aOFg== X-Gm-Message-State: AOJu0Yx/9KuzYzYLALoVnKhq8kGjiZlMy6UoJTc9NlqqdLa9ZjmduzhB NUmpkwBoiFxtYqqRJu2akAJ7eqshCHPTxzyN8DMgZt3zwCwSgvV8Xm+Toz+rCp/M X-Gm-Gg: ASbGnctr25O/MJh9mWrJ30+NSIjPMyOqqBvIKxGtb27G0Bqql5RdiFSeIYQeP5lPD65 Py6kgkywwRvlpS8vYiFL6Rtg/uZuQXHj5ZgibiT+KQNVqxWHED1CZOxDQE1Qzy/N67v169otmZG zyU4RkRqvgjZMXRbwL/ak6YNGCQ/Fxcm0HWy1PPiqJl7h2DZnSreBa2Qb4ovHwd5GAKwoz1cP9h 1GToGvGOuBcP2lVDi8kM2CfGrCjeMsgt4XYh1MfAgBKunzPyZMyee3llyupo82KRvJYfI7sAIvP l4htThuTwsK2K8s5xQeqzyZgwviqQkYvaiKahkaK+a9ylGzvAy2VGh4v+Yiv1kQ= X-Google-Smtp-Source: AGHT+IFPZhvdsZmobse9FqyEmEJhMih9moEOtBQ0m3gO4+OezrjyxSUZlMIpgY7elJ4/JathyS614g== X-Received: by 2002:a05:6000:26d1:b0:3a0:b1f7:c1da with SMTP id ffacd0b85a97d-3a4cb4b8353mr3553465f8f.46.1748161405003; Sun, 25 May 2025 01:23:25 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4d6c9faffsm598621f8f.74.2025.05.25.01.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 01:23:24 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> In-Reply-To: <87ldql1715.fsf@HIDDEN> References: <87r00d185v.fsf@HIDDEN> <87cybx5f4u.fsf@HIDDEN> <87ldql1715.fsf@HIDDEN> Date: Sun, 25 May 2025 10:23:23 +0200 Message-ID: <87a5715cas.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Sergey Trofimov <sarg@HIDDEN> writes: >> Once thing we could do, is to pin the Guix channel to the current commit >> so it does not pull. I can try to implement that if you would like to >> have that behaviour. > > It'd be nice, otherwise one would need to use `--commit=$(guix describe > ...)` which might work, but is not that user friendly. Done[1] :) Please let me know if you have any more feedback! [1] https://issues.guix.gnu.org/78580#5
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v2] pull: allow filtering which channels to pull from the CLI Resent-From: Sergey Trofimov <sarg@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 09:55:01 +0000 Resent-Message-ID: <handler.78580.B78580.17481668732062 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.17481668732062 (code B ref 78580); Sun, 25 May 2025 09:55:01 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 09:54:33 +0000 Received: from localhost ([127.0.0.1]:42809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ83s-0000XC-Iq for submit <at> debbugs.gnu.org; Sun, 25 May 2025 05:54:32 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:56724) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uJ83p-0000Wr-Ry for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 05:54:30 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-ad572ba1347so206968666b.1 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 02:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1748166863; x=1748771663; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DUDqz9z0u8gBuw+A4pps+cG2kHvVJWzOJe1+sQNew7w=; b=ZvtYtWLp+kd0LIXn5jhSZn9U3zVT88VbH3oXKbhKj2B/qFMrXWkJ/8FbIMP1Ei01k+ UerIKUxBU4sG1fNzP+u7vke/6Ag4WSLWT3Xv615TJPjVDOfrbs9lm6nAIn4bFGLBQZ6j jaZhPjp60FmG2ypJ8ZittQmsMvZQYBZ3i89efZxwRV0MukHg0CToKqBfkty3M97+8KQA 9dpoMLWHVHFIyw2bmqFmjHfsu2sVvPF9VhVKZJjDwyN7WiNZiSZjyui8WRg8Y5QA8ycg KLvgYDKHVbJw2l1WIhi80K1JlK2j6EMiSjacYyr2xXUFcsnxTYsG0egFttu+c/0l7kc8 LxxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748166863; x=1748771663; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DUDqz9z0u8gBuw+A4pps+cG2kHvVJWzOJe1+sQNew7w=; b=g789P8HwdKMT0+64QECXwbnsTQupGke728L/1NwtF7+GIHVZ76Rzf0lBLv1pWF8e4y rUA4hetaj9h7xNta1Kl2wUncWzHg8oj549OWKbPBbeyRuqvI+WR5l8PN4D/+g+AdWNUX HeU+d7pdR3zqaBZDkgHgDDjjLdXMhvip8Wg3sFkCBOPn5RPAlCWFfj5IqViHerWJ+0Ji /w9rai+ICJhilX+EtQoGHUJR3VqljVlGDu51GQydd3xBCMkevumFfnYgsDZXIp62Rlkt spEDu2Pw+3FbqyATy3gacEzAY1IWp9PJ1witponk5BZYqBS4d8itJgq8f1W3cwazCQOs eWtA== X-Gm-Message-State: AOJu0Yy42XGbQiILyneBYbmltAzBn/yNr+fMdUfsMJGKgFYYMM0cJTXE 9kA33rFgvBFVgKPmzJPlYPJulxDM+F34zGWH/XNkGXGyErzY4xTWVBmzzxDZMJdJsqE= X-Gm-Gg: ASbGncvo7yVle7ckU7ztqiqXbGx/LqMMYwRlS/PPWOR+hb3C/vTx60RJhL354XXqop1 XSPDAuEXAFybl1adfLtO/nV2G5oLIf76fHXNPUK3WXOgTdp2PEc5IKGegsKfRvJtFQFnxHKfStG fTyjTYrpD5/78aerXBgfoh4p9OuLFQ/F1evkU6LM0F3xKEAeg5Zks0CQ53rxFKwgPOdodgQUpWk 0YWs3fUYIr7qo0UqxzN81mhiRHsvxLNaTtB4bDlaBFBjTp3mLgPEiKOtL4UaBskHK8NRPviaLKD 1N4L0SD09v1DgLEvy1NPJmWKe+0tKOdpmTOr2s8n7lggYIR7 X-Google-Smtp-Source: AGHT+IE5p6qQpY1TWlJuOlj2Bb3rJV+QRjcZTPuPP3jMQtP59l2biyZF5cw5cEy8NRf0Fv82dKSnmA== X-Received: by 2002:a17:907:6d0c:b0:ad5:54e0:4c97 with SMTP id a640c23a62f3a-ad85b211e8emr364382766b.50.1748166863500; Sun, 25 May 2025 02:54:23 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad52d497a0fsm1540866666b.140.2025.05.25.02.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 02:54:23 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> In-Reply-To: <87a5715cas.fsf@HIDDEN> ("Sergio Pastor =?UTF-8?Q?P=C3=A9rez?="'s message of "Sun, 25 May 2025 10:23:23 +0200") References: <87r00d185v.fsf@HIDDEN> <87cybx5f4u.fsf@HIDDEN> <87ldql1715.fsf@HIDDEN> <87a5715cas.fsf@HIDDEN> User-Agent: mu4e 1.12.11; emacs 30.0.92 Date: Sun, 25 May 2025 11:54:22 +0200 Message-ID: <871psdyq0h.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Sergio Pastor Pérez <sergio.pastorperez@HIDDEN> writes: > Sergey Trofimov <sarg@HIDDEN> writes: >>> Once thing we could do, is to pin the Guix channel to the current commit >>> so it does not pull. I can try to implement that if you would like to >>> have that behaviour. >> >> It'd be nice, otherwise one would need to use `--commit=$(guix describe >> ...)` which might work, but is not that user friendly. > > Done[1] :) > > Please let me know if you have any more feedback! > > [1] https://issues.guix.gnu.org/78580#5 Ok, after a test I see it does something unexpected. I have 4 channels in my system (guix/nonguix/sops/personal). After `guix pull nonguix` I've ended up with a generation containing only guix and nonguix, other channels were gone. If I get your intent right, then instead of `filter-channels` you need to implement `unpin-channels`, so that the new generation is built from the current channels and the ones specified by the user are updated.
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v2] pull: allow filtering which channels to pull from the CLI Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 10:22:01 +0000 Resent-Message-ID: <handler.78580.B78580.174816846710112 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergey Trofimov <sarg@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174816846710112 (code B ref 78580); Sun, 25 May 2025 10:22:01 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 10:21:07 +0000 Received: from localhost ([127.0.0.1]:43010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ8Ta-0002ct-8Z for submit <at> debbugs.gnu.org; Sun, 25 May 2025 06:21:07 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:55751) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uJ8TW-0002bj-T9 for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 06:21:04 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3a3771c0f8cso971912f8f.3 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 03:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748168457; x=1748773257; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FN4u433JBq5tygngGi2qOfIkmoGKXiZadTOlc3AaajA=; b=VThkiNoMqIDtF2pMN60eE2aCm3eRAlZKNmCLu/Si6Y4FvNPJbIwy9qT1Zv7+8Sh04a RuMT7hbO/yiA+s9fmq/z3lp1d7nMHE+4JHRci+xxie5IQoNpjwrkHjOI1q4RTsjLOuq3 wF7eXq1p3azjpgxP5XKFw2RVB0rCDqc0D1LbuDbQyj/M/ArtyAM9ulCzA7CcbfTxvsRF KIVbGAOIAQ+BO3hsyC9ktwRf2bZSXXuu4MzdsMK8yvW4F04bE7VLbpe1U4uQVcaNP7cV TT9k918rZbU1UqYKkpevprBC491uXAHrnuLCyBDuNivy3W5Jw/IZJcGjqmYtYY+YzgNC 9MWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748168457; x=1748773257; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FN4u433JBq5tygngGi2qOfIkmoGKXiZadTOlc3AaajA=; b=QtWlVMBdgLMeCnGrg86zdQnDUbcOc8zxiUtxJSeDXXGkbUvD90hqXK5OKtu0S5EsE7 8Vip5IDt3ezCzpin+9UdQc/qeN5iI1YCYjGU7KduTvsLGSoe/UHs0tKYZaQKIQHvDLB1 VXHKTHlrVsOJM3lvfYgSEP6t25y2mj3JNbcTnW7euWmnOL+oMhZg70mEr/LJM8Fou1zC 6APCYaVDuHMHt7Cpys4gp7FqMGjIZH6h6MjejbpU6WZuIg/OCuRZJ1KyBHF63cIKeARX nJZKaCP85sB82e0Z+R3iW5PfKFYGAfSIio+JSK5FYuhxJrdzABAayq4mYefTwR1TsACE 5ctA== X-Gm-Message-State: AOJu0YxqKwkQYjnJLibyJ8Lb0AhDhI3n3+/a7S5jTwGJcqZ6R1q5sWo7 BItSn3QaqaeBXceQBih13vGmouhZU8Ilnd8i4MLWpyvjy9P+eXAffPhJ X-Gm-Gg: ASbGncudWhi9o8kK9U8Lmzr/TuMJRQ39NsaCEpuNmER2EqysVerSGazVoTfQ4N7odnL fV07g1gY6ul2oawrOdH2hCdPsk78z/oeblUfhumEBd91BPMt+ssLBjWFW7UKWdai+CajcnY9sS4 UYxHR7v63KnyjY72CLwNWbNBRprYLfTFAZkea+BS418GGwU+2m2C1v593U19B5HLthZ7MNkfQfR gVryHctrJ+ndxBVcYBIs0Hy/sIrNVz5q5G0GaZENyG+0nfDroZ/XUBUNunscCql7EV2508IbhJH pQUQ3+BKUAAdeBz/vL6dNdAex+6vxay4Nw4vkHfWEK3YlllcL2FBM8SwD+L/KMQ= X-Google-Smtp-Source: AGHT+IFs5skzKU3XanV6ZqbZ4jvAQSRwpAmySg3xGIKlAMMp+tHcYhf4iwng0DHGOdMlnXDxRT67Hg== X-Received: by 2002:a5d:688a:0:b0:3a4:ce96:75d8 with SMTP id ffacd0b85a97d-3a4ce967831mr1853317f8f.4.1748168456437; Sun, 25 May 2025 03:20:56 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca62b5dsm32575071f8f.55.2025.05.25.03.20.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 03:20:55 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> In-Reply-To: <871psdyq0h.fsf@HIDDEN> References: <87r00d185v.fsf@HIDDEN> <87cybx5f4u.fsf@HIDDEN> <87ldql1715.fsf@HIDDEN> <87a5715cas.fsf@HIDDEN> <871psdyq0h.fsf@HIDDEN> Date: Sun, 25 May 2025 12:20:55 +0200 Message-ID: <874ix956uw.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Sergey Trofimov <sarg@HIDDEN> writes: > Hi,=20 > > Sergio Pastor P=C3=A9rez <sergio.pastorperez@HIDDEN> writes: > >> Sergey Trofimov <sarg@HIDDEN> writes: >>>> Once thing we could do, is to pin the Guix channel to the current comm= it >>>> so it does not pull. I can try to implement that if you would like to >>>> have that behaviour. >>> >>> It'd be nice, otherwise one would need to use `--commit=3D$(guix descri= be >>> ...)` which might work, but is not that user friendly. >> >> Done[1] :) >> >> Please let me know if you have any more feedback! >> >> [1] https://issues.guix.gnu.org/78580#5 > > Ok, after a test I see it does something unexpected. I have 4 channels > in my system (guix/nonguix/sops/personal). After `guix pull nonguix` > I've ended up with a generation containing only guix and nonguix, other > channels were gone. If I get your intent right, then instead of > `filter-channels` you need to implement `unpin-channels`, so that the > new generation is built from the current channels and the ones specified > by the user are updated. You are right. I did not realise that the internals of `guix pull' does not take a list of channels to update but a whole channel profile to deploy I will correct. Thanks for pointing it out.
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v4] pull: allow filtering which channels to pull from the CLI References: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> In-Reply-To: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: sergio.pastorperez@HIDDEN, sarg@HIDDEN, guix@HIDDEN, gabriel@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, maxim.cournoyer@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 10:56:02 +0000 Resent-Message-ID: <handler.78580.B78580.174817052522007 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78580 <at> debbugs.gnu.org Cc: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Sergey Trofimov <sarg@HIDDEN>, Christopher Baines <guix@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> X-Debbugs-Original-Xcc: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN>, Sergey Trofimov <sarg@HIDDEN>, Christopher Baines <guix@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN> Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174817052522007 (code B ref 78580); Sun, 25 May 2025 10:56:02 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 10:55:25 +0000 Received: from localhost ([127.0.0.1]:43353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ90m-0005iq-Mh for submit <at> debbugs.gnu.org; Sun, 25 May 2025 06:55:25 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:61884) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uJ90k-0005iD-6f for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 06:55:23 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-442ccf0e1b3so19853725e9.3 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 03:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748170515; x=1748775315; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=d2jI/z4ZOJ7Q93sTYP4LtgBa44D13W9PthHb6d2uGD8=; b=RhRuyhDqCOQ/skAKVdU5I8nP3an3bCpmY7NkdNn2HgDsmeULHw1kDUdFOinMG2RRvU aFkA+w9wyHh0fvJBDnZmNFs30Eb/r+DEqNP144eq//Jpw9G+KU4PlTQ0b3TntKJwt4oV COag5zK631ltpiai0ACC5OVhDGJz4oDD1PtbORt3WRjVgBigWfQViPqVg8LpewX9+kzh Ru1J8M09ag7OYTWayZdH0Qkznyw2viZ/BDXEQSSL1Jw6gdRJOXcUgkx/4jDC89I1QHnl 2MVpwxwy4wxwUlarWjdFsV/NrDnyv2pN0zBk2yU8zSdrh+tYhoS6URUXJKnkXpaeEBlJ 0UjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748170515; x=1748775315; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d2jI/z4ZOJ7Q93sTYP4LtgBa44D13W9PthHb6d2uGD8=; b=aRAImjz2GOMqfqbBCeoxup7dacRZM+vIixrbBGbTzyKTI5rRdIz8vG/g670shYGKMO yP51piOeb06dPiuqOOwmpUxBzWMo7SLo6/y7IpSYwFxBDSc/v0OpEMD8D0Nx4DTj53Eb VlxC6I/G4IUQSaLHKMIOygFYboT77NQtzpiN6fc3GC+6epOZiU5UPBHASJ5X1TcRn7pa QQDG3tKbQ7h2VBk7VfAF7vqpWguAApkhvoVx1a6z45Dt2ZHaGBdqJRSSKmcuIOjoLieE yqhtL71Dboh8q2u1+cG4dzFaTYoexiOBELAYcmN7CPTIQewp/5jaq8e8pkkjr8TpKqAS 9BOQ== X-Gm-Message-State: AOJu0YxHS6kXKHKF4bbW7i+INp02fae+nHZUnF45VcTw486kFRF2dLiX zkLB6f4tyi0gWImUE6VpDl/pbOwheoU58dtWsDfGU2XOKNlqMT6w6szUUiwxbWBo X-Gm-Gg: ASbGnctZxkVFk2rsCchxmhQVmUqTx6VGSJ7fEBRTAAAVBT6KSgRO4aFyO/zq2g2Zwgp KjvXbKgXMDu7mJD5pum0wWjyGvpMb5+B7/KJ52CoEi9QRalvMy6moY47V+NPzCwqnmfP5BS9g/c DfxCuDI5XcTHoS4hwM7v00g+VQZ+8a/LG7ixKAtEqq9HZB8tpSjwKIdQpE9CHRpPHS1Ck7XN4tl h44ziAXn9qkRodS4eW0JJ8vHM82x/jHdaYKAkpKvDpxa30bB+CoNwTIZ2CTZTl360+cRDNbmUio nFvEk/eHcVTRIpyxp31qZAlL8y/OAHNQSeaUtUN6EeeH+rQ+XK5iy6fVJKdXg/o= X-Google-Smtp-Source: AGHT+IGfW9yioJx92jedSLOmVnbI+KIMdoSl204MskMBAE1xk79Q0lye/B59fOQ4A+imN+fi6cv3Xg== X-Received: by 2002:a05:600c:4e0a:b0:43c:f895:cb4e with SMTP id 5b1f17b1804b1-44c91dd158bmr49831945e9.17.1748170514623; Sun, 25 May 2025 03:55:14 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-447f18251c7sm203889115e9.3.2025.05.25.03.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 03:55:14 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Date: Sun, 25 May 2025 12:55:02 +0200 Message-ID: <47f6b899454a44acc2570a57b5fa6caaf8a47706.1748170502.git.sergio.pastorperez@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * guix/scripts/pull.scm (guix-pull): treat non-prefix CLI arguments as a list of channels to pull. Change-Id: I5d08c4b1cc84ab58a9c4e7600eb86468f92d10f0 --- doc/guix.texi | 10 ++++++-- guix/scripts/pull.scm | 53 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e4e2b853f1..26f16cfa7a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4656,8 +4656,14 @@ Invoking guix pull deleting /var/guix/profiles/per-user/charlie/current-guix-1-link @end example -The @command{guix pull} command is usually invoked with no arguments, -but it supports the following options: +The general syntax is: + +@example +guix pull [@var{options}] [@var{CHANNELS}@dots{}] +@end example + +The optional @var{channels} argument filters the list of pulled channels +to those whose names match the given list. @table @code @item --url=@var{url} diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 76aed0b5cc..fc6809d68c 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -81,8 +81,12 @@ (define %default-options (validate-pull . ,ensure-forward-channel-update))) (define (show-help) - (display (G_ "Usage: guix pull [OPTION]... -Download and deploy the latest version of Guix.\n")) + (display (G_ "Usage: guix pull [OPTION]... [CHANNELS...] +Download and deploy the latest version of Guix. + +If CHANNELS are specified, pull only from channels with those names (e.g.: +'guix pull rde nonguix' pulls only from the 'guix', 'rde', and 'nonguix' +channels as defined in your channel configuration).\n")) (display (G_ " -C, --channels=FILE deploy the channels defined in FILE")) (display (G_ " @@ -839,21 +843,52 @@ (define (validate-cache-directory-ownership) (define-command (guix-pull . args) (synopsis "pull the latest revision of Guix") - (define (no-arguments arg _) - (leave (G_ "~A: extraneous argument~%") arg)) + (define (unpin-channels channels current-channels names) + "Unpin CHANNELS whose name symbol is present in NAMES list. +If NAMES is an empty list, don't filter anything. Warn when a name is not +available in the channels list." + (if (null? names) + channels + (let ((available-names (map channel-name + channels)) + (selected-channels (filter (lambda (ch) + (member (channel-name ch) + names)) + channels))) + (for-each (lambda (name) + (unless (member name available-names) + (warning (G_ "Channel '~a' not present in channel list~%") + name))) + names) + + (map (lambda (cur-ch) + (let ((selected-channel (find (lambda (ch) + (eq? (channel-name ch) + (channel-name cur-ch))) + selected-channels))) + ;; If the user selected this channel. Follow channel file + ;; specification. Otherwise, leave the channel pinned as + ;; defined by the current profile. + (or selected-channel + cur-ch))) + current-channels)))) (with-error-handling (with-git-error-handling (let* ((opts (parse-command-line args %options - (list %default-options) - #:argument-handler no-arguments)) + (list %default-options))) (substitutes? (assoc-ref opts 'substitutes?)) (dry-run? (assoc-ref opts 'dry-run?)) (profile (or (assoc-ref opts 'profile) %current-profile)) (current-channels (profile-channels profile)) (validate-pull (assoc-ref opts 'validate-pull)) (authenticate? (assoc-ref opts 'authenticate-channels?)) - (verify-certificate? (assoc-ref opts 'verify-certificate?))) + (verify-certificate? (assoc-ref opts 'verify-certificate?)) + (selected-channels (filter-map + (match-lambda + (('argument . name) (string->symbol name)) + (_ #f)) + opts))) (cond ((assoc-ref opts 'query) (process-query opts profile)) @@ -877,7 +912,9 @@ (define-command (guix-pull . args) (ensure-default-profile) (honor-x509-certificates store) - (let* ((channels (channel-list opts)) + (let* ((channels (unpin-channels (channel-list opts) + current-channels + selected-channels)) (instances (latest-channel-instances store channels #:current-channels base-commit: 096dedd0bb13523002c814b001429c2f65b6f10d -- 2.49.0
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v4] pull: allow filtering which channels to pull from the CLI Resent-From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 11:04:02 +0000 Resent-Message-ID: <handler.78580.B78580.174817104024709 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergey Trofimov <sarg@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174817104024709 (code B ref 78580); Sun, 25 May 2025 11:04:02 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 11:04:00 +0000 Received: from localhost ([127.0.0.1]:43436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJ995-0006QS-ST for submit <at> debbugs.gnu.org; Sun, 25 May 2025 07:04:00 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:44045) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sergio.pastorperez@HIDDEN>) id 1uJ993-0006Pw-83 for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 07:03:57 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-442ec3ce724so11129475e9.0 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 04:03:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748171031; x=1748775831; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BAVthV5NbHBiMr/z/41vI+TLU9eIcjZ4h3bkf3ddP90=; b=i0nhozkWvQ443lUKWABQkfUQAFue1DMOYsrx8/IPxwI9JeGWLc1Zz0JEW0C/XXItN9 WUvBlgk3jRyprKuL2VtXqre4FmZAnlLNH2T6rZmG34OTVf4T6eRTrdrHgdYnodut3yAn x75G88L4fc8Uepn19CmrpbpXVU9rQqMiaWD6gKZgcf+sO1abKWPBzSuR9QoB5jb+wi/2 JKtte1/c3ouP/R+LxWokhnuHKh+62MRyqGLHgpLr+CMUdUjhpxWMtOAOoPAh0MjLUYIr pzE7KYg6QQCWgkSakFyg0DCc7xjKbvuMBAXYJTUA/79lXCDg48yc4+P/QpmkMFBoe8Ia Qjmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748171031; x=1748775831; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BAVthV5NbHBiMr/z/41vI+TLU9eIcjZ4h3bkf3ddP90=; b=YbAe0JeOJCVbgSx+q35UItQuZ1NzA3Y0qsxKDfeSjx8YT9i6d+zfofOcvZkerg3kYf 5WkQbrRY9cAb6oae4qMX3kIUXhYA0wNfUvXMAvn3iwqZpLsSpoYt1CtLRuVMn1CvU4nW wGqlP9TYOAA+aEXGcmXLfkGRLjxSmpAIP4QGkSBjslWPg1VGoP7+Bi3/NQ7+DbN8vrU0 gTZZka30maP5GrOqicA0TqYL00qlq0b/QJt1g76M1pQ8CW2Z/rrlhDZnDZjSuYiqIU5K ZahIOgLHXC9bEsW0OXv2UAoaOwHmct2l/6q/2geIs18JCwi62Z9YpbiqTR338MXlMEFK GpSA== X-Gm-Message-State: AOJu0YxEmDH2CPE4Lyzz1n+q5wNh6db7FJ6Fs9daPVqXS3jz99ltSrW3 94rr6EjMit7iTAa7dZnF/jD4HTSiGuEpyVnqh1hEzivbKqftnkBwVK81 X-Gm-Gg: ASbGncvpsRww85xGSdyB62mVaUOVBiBgdjPhmVwrWlkvyQR70Ao1SphxAW08mlaFMEe 1aMYpzfGg51tDPu1szPLp4glkkEv9F/0UxVCiya/HpkMGfhM7W+kAgrxFWgyGm4bKXSD41RzhL5 ekNQgkwot/6q7ZbJwC37UmTqJzICHK1H6jD6br394vosx8eSu2I+aj68mgam5Q1QK6j26lm6nCm 8qDrB3p7w1M1oMOdLYoYiqUpbUIrEzCQ26dMP6q3QeWc52tMM2OEHGqitrXZV+chwiDMoOB6FoL LGgdfO0Bjoo8/smoWO8qnYo03j9wMGwA7XUv1MrsqJUTTZy7TzvzTc12Bj72PCI= X-Google-Smtp-Source: AGHT+IHrK+oLo6wvCJ9nsGzh4TaA8G9U620P/pF9A/nv+U2YhQ1NrQOs7OLEGTkAJ0ubztn0WGXVng== X-Received: by 2002:a05:600c:3c93:b0:43d:fa58:81d3 with SMTP id 5b1f17b1804b1-44c933f0edfmr36833305e9.32.1748171030773; Sun, 25 May 2025 04:03:50 -0700 (PDT) Received: from localhost ([2a0c:5a85:d10d:400:c3bc:fe9a:3b9b:8351]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a36c6eeaf8sm24309229f8f.48.2025.05.25.04.03.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 04:03:50 -0700 (PDT) From: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> In-Reply-To: <871psdyq0h.fsf@HIDDEN> References: <87r00d185v.fsf@HIDDEN> <87cybx5f4u.fsf@HIDDEN> <87ldql1715.fsf@HIDDEN> <87a5715cas.fsf@HIDDEN> <871psdyq0h.fsf@HIDDEN> Date: Sun, 25 May 2025 13:03:49 +0200 Message-ID: <871psd54ve.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Sergey Trofimov <sarg@HIDDEN> writes: > Hi,=20 > > Sergio Pastor P=C3=A9rez <sergio.pastorperez@HIDDEN> writes: > >> Sergey Trofimov <sarg@HIDDEN> writes: >>>> Once thing we could do, is to pin the Guix channel to the current comm= it >>>> so it does not pull. I can try to implement that if you would like to >>>> have that behaviour. >>> >>> It'd be nice, otherwise one would need to use `--commit=3D$(guix descri= be >>> ...)` which might work, but is not that user friendly. >> >> Done[1] :) >> >> Please let me know if you have any more feedback! >> >> [1] https://issues.guix.gnu.org/78580#5 > > Ok, after a test I see it does something unexpected. I have 4 channels > in my system (guix/nonguix/sops/personal). After `guix pull nonguix` > I've ended up with a generation containing only guix and nonguix, other > channels were gone. If I get your intent right, then instead of > `filter-channels` you need to implement `unpin-channels`, so that the > new generation is built from the current channels and the ones specified > by the user are updated. Alright, now you should get the expected behaviour[1]. Please let me know if you see any problem. [1] https://issues.guix.gnu.org/78580#9
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v4] pull: allow filtering which channels to pull from the CLI Resent-From: Sergey Trofimov <sarg@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Sun, 25 May 2025 14:22:03 +0000 Resent-Message-ID: <handler.78580.B78580.174818287231833 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Cc: Josselin Poiret <dev@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174818287231833 (code B ref 78580); Sun, 25 May 2025 14:22:03 +0000 Received: (at 78580) by debbugs.gnu.org; 25 May 2025 14:21:12 +0000 Received: from localhost ([127.0.0.1]:46281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uJCDu-0008H7-J3 for submit <at> debbugs.gnu.org; Sun, 25 May 2025 10:21:12 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:48568) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <sarg@HIDDEN>) id 1uJCDr-0008Fu-Gq for 78580 <at> debbugs.gnu.org; Sun, 25 May 2025 10:21:08 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-60410a9c6dcso2238510a12.1 for <78580 <at> debbugs.gnu.org>; Sun, 25 May 2025 07:21:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1748182861; x=1748787661; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y/VHL2kNhGlVyZNRsT7AUpF7YBF7126KEKZSKoq8M1Q=; b=xlB5AiH2BtXi7P0fJmtVzsk0JcsvOOUc8/D4/rvKt/ezYnMbHdDxsksR7ojdOwfk3Q s0OQgZ3br+SkWU8EbLbRAg1m3galBm8R0eguxRaEHaPNj/KikGwkTBKPsmnWQ1d40WjU OaVI2FGRiBRrf8x10QhkhEMpWllLOxNPjnf8xw3hr45QKowSMYC1JV/QxRheXDkUNP6y 7hDFocdHC1sSdRfB2cs2CgKIbSnkq5caIk4cDfAS4++ALS7J3HtI75FlBIJcwCGMHN2a zk3RwVR/hFguRAcPUtY4DbwrRHJRBXlLkxxO9Am4yzSzupWZ5jS/1iMlS7587hqPxQGo yFUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748182861; x=1748787661; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Y/VHL2kNhGlVyZNRsT7AUpF7YBF7126KEKZSKoq8M1Q=; b=wRBwKqPwX7ljEFssIGjEE4KNtELxQQ13WqnD2UEIeTZllTiu4BT96rwGmNMv4ss3YV /tTWoQfJ/V6ZsQW4zT1bCdamp25MWd+eMl9IhqQvI/2bCN2HVIbUydd/sU6Aq5hT5BHu eG8fKMFOdvOwWKLd/Tzsfp8xO6XiLQqNNra7EyC4mqUtnWY0NdqTzjT8Bi2OoBkp0+Bd U+iIO2ZOntOXDMd7x2kBDeEq0vkK5NwwFDQM9B2a8kzdFM5kGn4c59Jdrmbldc5EtwZS EeDjObh4q/+W+eBZowmtC4yf6xIB7pOZv1DBXRrPdjz3cbqMd5TWRPMAalfS5T0GNZHW tWgg== X-Gm-Message-State: AOJu0YwHrCli4U4+hrjEHYRE3FWblKoVeGeXG84tES5K4p+4B0UuaW6T qGksGKJPiHeU0q4BlcdWNjIArwX2zVMfqJLCs7vzUCvOUVT0wp7rBX1b+vzq0pwZTgA= X-Gm-Gg: ASbGncsGenHeTW/XNggoZljXA/9TjLCHmcCKEhwny7e5spRaDbg7jRiAZFzap9+43or DcuDHslpLlg7d8YeIzYyv88NViFwF5L9O8/oMXHt3u+1SZZoF5Yva2s9c9pS+k0qAbxgQ9QWJc6 vs+7QeF4YlRyGKj3oD78z/P2VfpHE6KXjIDxn9c+8HEWnlhi/dOE13PLN68zkGuRk2CoxBDKHGV aJbcou2z3s3tLJMjhMCKspnjZU9cLE6wtrMCd/qsfeKsZ0B8AlyU7x1fA90sA3Us0Fw0y64LQQ5 JDTxKcbQRrsIEy8EqZkKPpTvEcb7BEgqGLlocyV4TJVYbKLfNllhXBZNn5s= X-Google-Smtp-Source: AGHT+IFTwmVsGXzIAxCl8Q00ldiT+jX6CyyhoYum71TRXWWW9T/Rj3wkobjf9Pn83EPY0Cb8MmvDWA== X-Received: by 2002:a17:907:6d0c:b0:ace:cdfc:40aa with SMTP id a640c23a62f3a-ad85b111d89mr525557366b.19.1748182861074; Sun, 25 May 2025 07:21:01 -0700 (PDT) Received: from localhost ([2a02:2454:a095:5600:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ad52d06dc6csm1554047266b.53.2025.05.25.07.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 May 2025 07:21:00 -0700 (PDT) From: Sergey Trofimov <sarg@HIDDEN> In-Reply-To: <871psd54ve.fsf@HIDDEN> ("Sergio Pastor =?UTF-8?Q?P=C3=A9rez?="'s message of "Sun, 25 May 2025 13:03:49 +0200") References: <87r00d185v.fsf@HIDDEN> <87cybx5f4u.fsf@HIDDEN> <87ldql1715.fsf@HIDDEN> <87a5715cas.fsf@HIDDEN> <871psdyq0h.fsf@HIDDEN> <871psd54ve.fsf@HIDDEN> User-Agent: mu4e 1.12.11; emacs 30.0.92 Date: Sun, 25 May 2025 16:20:59 +0200 Message-ID: <87seksydo4.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) X-Draft-From: ("nndoc+ephemeral:bug#78580" 3) Hi, Pérez <sergio.pastorperez@HIDDEN> writes: [...] > > Alright, now you should get the expected behaviour[1]. Please let me > know if you see any problem. > > [1] https://issues.guix.gnu.org/78580#9 Confirming it works now correctly. Date: Sun, 25 May 2025 16:20:59 +0200
X-Loop: help-debbugs@HIDDEN Subject: [bug#78580] [PATCH v4] pull: allow filtering which channels to pull from the CLI Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 04 Jun 2025 08:52:02 +0000 Resent-Message-ID: <handler.78580.B78580.174902708531632 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 78580 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergio Pastor =?UTF-8?Q?P=C3=A9rez?= <sergio.pastorperez@HIDDEN> Cc: Tobias Geerinckx-Rice <me@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Sergey Trofimov <sarg@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Gabriel Wicki <gabriel@HIDDEN>, Christopher Baines <guix@HIDDEN>, 78580 <at> debbugs.gnu.org Received: via spool by 78580-submit <at> debbugs.gnu.org id=B78580.174902708531632 (code B ref 78580); Wed, 04 Jun 2025 08:52:02 +0000 Received: (at 78580) by debbugs.gnu.org; 4 Jun 2025 08:51:25 +0000 Received: from localhost ([127.0.0.1]:46972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uMjqG-0008E8-QO for submit <at> debbugs.gnu.org; Wed, 04 Jun 2025 04:51:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33168) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1uMjqE-0008DT-H8 for 78580 <at> debbugs.gnu.org; Wed, 04 Jun 2025 04:51:23 -0400 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 <ludo@HIDDEN>) id 1uMjq4-0002AF-4W; Wed, 04 Jun 2025 04:51:12 -0400 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=RVdULmefWbZ5qcJKtgWatXD0VfuwToQBNdTOOKKhoys=; b=GIoAbMNXRMGNVxhk6Ahv uD+q5qDFLbVOCTlPfTI7iyvkGmnKlv9fGWxF4KMpcoWwp06hch/gbut8AkQWtRwOK5VSea4NQkB4X DG9RR7q7Pbe8Ordpl1luo7UMM5KhT6ne1fpjs9xSKOik9FgA6OLCo+YLUIg/1qoBpYrCUxmUeuay1 mUlmLTyJdz8158SMkn9XK2YIqFsawVBS9C9D7n+HHXeHt23KTZqjKf31sb4HM3VHVqLgiy3/igjEy gKZocPJINA6uP4bTZ9I4eZwBwpOYG6jbXSoLKIIML4GBHmk3zmFak5v0yWShno7Saf9wAMDk0H910 3MVicaB1xzWFbw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> In-Reply-To: <47f6b899454a44acc2570a57b5fa6caaf8a47706.1748170502.git.sergio.pastorperez@HIDDEN> ("Sergio Pastor =?UTF-8?Q?P=C3=A9rez?="'s message of "Sun, 25 May 2025 12:55:02 +0200") References: <e6dd2ed103f3474b5c1f66d8391b910a4dd81d67.1748106755.git.sergio.pastorperez@HIDDEN> <47f6b899454a44acc2570a57b5fa6caaf8a47706.1748170502.git.sergio.pastorperez@HIDDEN> User-Agent: mu4e 1.12.11; emacs 29.4 X-URL: https://people.bordeaux.inria.fr/lcourtes/ X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-Revolutionary-Date: Quintidi 15 Prairial an 233 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la Caille Date: Tue, 03 Jun 2025 10:14:36 +0200 Message-ID: <87r001mec3.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.8 (--) Hi Sergio, Sergio Pastor P=C3=A9rez <sergio.pastorperez@HIDDEN> writes: > * guix/scripts/pull.scm (guix-pull): treat non-prefix CLI arguments as a = list > of channels to pull. > > Change-Id: I5d08c4b1cc84ab58a9c4e7600eb86468f92d10f0 Please mention the doc/guix.texi changes. Some comments: > +@example > +guix pull [@var{options}] [@var{CHANNELS}@dots{}] =E2=80=9Cchannels=E2=80=9D (lower-case). > +The optional @var{channels} argument filters the list of pulled channels > +to those whose names match the given list. This would need to be clarified. IIUC, what =E2=80=98guix pull A=E2=80=99 = does is that it updates A but keeps the other channels unchanged, right? There=E2=80=99s a risk with this practice though: channels are typically te= sted against the latest version of each other. For example, =E2=80=98guix-scien= ce=E2=80=99 in continuous integration is built against the latest =E2=80=98guix=E2=80= =99; if one tries to update =E2=80=98guix-science=E2=80=99 without updating =E2=80=98gu= ix=E2=80=99, there=E2=80=99s a gradient of problems that might occur: it might work fine, or substitutes might be missing, or some packages from =E2=80=98guix-science= =E2=80=99 will fail to build, or =E2=80=98guix pull=E2=80=99 will fail upfront. > + (display (G_ "Usage: guix pull [OPTION]... [CHANNELS...] > +Download and deploy the latest version of Guix. =E2=80=9CDownload and deploy the latest version of Guix, possibly limited t= o CHANNELS.=E2=80=9D > +If CHANNELS are specified, pull only from channels with those names (e.g= .: > +'guix pull rde nonguix' pulls only from the 'guix', 'rde', and 'nonguix' > +channels as defined in your channel configuration).\n")) I=E2=80=99d drop this paragraph: =E2=80=98--help=E2=80=99 is concise by con= vention and further explanations should go to the manual. > + (define (unpin-channels channels current-channels names) > + "Unpin CHANNELS whose name symbol is present in NAMES list. > +If NAMES is an empty list, don't filter anything. Warn when a name is n= ot > +available in the channels list." You can turn the docstring into a comment since it=E2=80=99s not a top-level procedure. > + (if (null? names) > + channels > + (let ((available-names (map channel-name > + channels)) > + (selected-channels (filter (lambda (ch) > + (member (channel-name ch) > + names)) > + channels))) As per our coding conventions (info "(guix) Formatting Code"), s/ch/channel/ but you can shorten the other identifiers: =E2=80=98names=E2=80=99, =E2=80= =98selected=E2=80=99. > + (for-each (lambda (name) > + (unless (member name available-names) > + (warning (G_ "Channel '~a' not present in channe= l list~%") =E2=80=9Cchannel '~a~' selected but missing from channel list~%" (messages = are lower-case). > + (map (lambda (cur-ch) s/cur-ch/channel/ > + (let ((selected-channel (find (lambda (ch) > + (eq? (channel-name ch) > + (channel-name cur-= ch))) > + selected-channels))) > + ;; If the user selected this channel. Follow channel = file ^ Should be a comma. Thanks, Ludo=E2=80=99.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.