From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ANBwLdSV72MhjwAAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 15:57:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wKKcLdSV72M7OAEA9RJhRA (envelope-from ) for ; Fri, 17 Feb 2023 15:57:24 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 84D6C31D49 for ; Fri, 17 Feb 2023 15:57:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT2Ad-0006dC-8x; Fri, 17 Feb 2023 09:57:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT2AY-0006bJ-JD for bug-guix@gnu.org; Fri, 17 Feb 2023 09:57:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT2AY-0003ea-Af for bug-guix@gnu.org; Fri, 17 Feb 2023 09:57:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT2AX-0007y4-UW for bug-guix@gnu.org; Fri, 17 Feb 2023 09:57:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#61574: [PATCH v2] scripts: repl: Extend REPL %load-path with all channels. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Feb 2023 14:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61574 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 61574@debbugs.gnu.org, zimon.toutoune@gmail.com, iyzsong@envs.net, 61343@debbugs.gnu.org Cc: Josselin Poiret X-Debbugs-Original-To: Josselin Poiret via Bug reports for GNU Guix , Simon Tournier , =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , 61343@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167664579730600 (code B ref -1); Fri, 17 Feb 2023 14:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Feb 2023 14:56:37 +0000 Received: from localhost ([127.0.0.1]:40981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT2A8-0007xU-MP for submit@debbugs.gnu.org; Fri, 17 Feb 2023 09:56:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:46492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT2A7-0007xO-Na for submit@debbugs.gnu.org; Fri, 17 Feb 2023 09:56:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pT2A7-0006UD-Ay for bug-guix@gnu.org; Fri, 17 Feb 2023 09:56:35 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT2A5-0002wE-FZ for bug-guix@gnu.org; Fri, 17 Feb 2023 09:56:35 -0500 Received: by mail-wr1-x42c.google.com with SMTP id r25so2332303wrr.5 for ; Fri, 17 Feb 2023 06:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1676645791; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A2LCfKH/5SaXcgXYU5U98B32MLZGfXffUG43avL/JL0=; b=WF3Abz6tSwAF5kOefetkQqeil88+496hj3lnvkgDURqoVSOO6lVI7ofG8i7KBGgE2q vpzeyausQYiMOs92FCyfxDxpcjhPrzZvAHzrnsXewLJquPLv6P30FOY84V+MZ2RaKRPp 020ZZsH/5I3Wmyw2ms1Eh6wJ9fw5jjrIPjPrBMtEs/JdftKxyS6c/oC5Ou5MvjfHXiL9 h7Uk4ZTXSpZIwQ4AaBYGBXEG/q4dj4kkCGvwl1zV0rFl0QDFxi6y3kkvMMlLGpTvPnyq gxIwKZkSQKMo2zn6uwrNftezoxZ+c/T5nX2lexXOuYNv9qd8pfNAFHtBa1RvvqrU6DHt gBHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676645791; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A2LCfKH/5SaXcgXYU5U98B32MLZGfXffUG43avL/JL0=; b=PHq+r7vLG2qxV9mPxlX7wBUJ+1WsXqOeSTWrRd+/rlv2dQE2+jL4D0NstpBTjKcDa8 P9DSoPBC3UmvOAJ4vJCpjEGvwuu0GtFlvIe5Dv/g6KTODeIFkMbvStsCVZIR4+Qmm46r 4Huitpo5rH8XdL19FJwx1JOm82qWlXBLeZNAtHJMprV4ThdbE8dS/NF7sVYkxmj9ItsX tf8lQjGMx+L84olD+q4xsNXyyam2SDo8QDl9Mf6YViQBlGKorRv95UVQ8PuyWdygY/ja SF5UzGL+RoHxNyg/guqh165KTQ6cr1BGQJtmUCbHPixe61zpyfU5X2zAM864hjhca9GB 7t5Q== X-Gm-Message-State: AO0yUKWQJT4G16CeUib7kPQ9URfEWv14uuLNaKrUGE81ViES7z8gHWms zznlQNCdBReMwPcIW/VPK5kzkaUwVII= X-Google-Smtp-Source: AK7set+c5uR0SkGEEZxF3SM9DCrRqp6s1Ctsk1v5+CGFqUy2KgO5msr7SSEyr2a8bFSaNmwKw6Hhng== X-Received: by 2002:a5d:504c:0:b0:2c5:5e37:653a with SMTP id h12-20020a5d504c000000b002c55e37653amr810258wrt.7.1676645790705; Fri, 17 Feb 2023 06:56:30 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id j2-20020adfea42000000b002c5804b6afasm4495839wrn.67.2023.02.17.06.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 06:56:30 -0800 (PST) From: Simon Tournier Date: Fri, 17 Feb 2023 15:56:27 +0100 Message-Id: <20230217145627.85062-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42c.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=WF3Abz6t; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676645844; a=rsa-sha256; cv=none; b=clDpKZFhJVJcOp/uCC5H5J0GlD9mRvrMbZewNb7XYZ9O5DT5bEsYzZy3aFYpEIqTdkpPNd 63jFcrHkMXLX/RXFqAN1f1dKZxwjyszrsZHCeSiGsGTqfzeNAe2L/syXcDyNoVx84i8lV5 cBjxQpzU5ftlQ57mBaxrU80ZL9y5/f1EInp9CdfLLr/apDUM30A871G6ZYnOhfsLWLit+6 cIeH+NExce0UvHHeae0paznTD8c5zKl3qk+lFgHanQX19rxvoQrYGtaiiugLJMm2jxp3P5 nGHDE1VGh88aCFQB9zJRRXXcYeOazoy93b9Yhmk11WKrVQ5HNIS1C9U/MAZf0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676645844; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=A2LCfKH/5SaXcgXYU5U98B32MLZGfXffUG43avL/JL0=; b=BXY/npTKWSnFrfVVvVHPV/gHb676oEjdR0IJJd1NO5lJ67922mSujgdYW/2D7940NGuv7h 8CXPo9OWnjc2Jgl2rui/J4Q/vn6lOgC5Cn8cCuVXNUJw56ieX2pX3fdl+YT/dprFKgYV8+ xElvBKfr8E0Oib82BFJXPqlKQVCDop4wN8kHlVnyPDbOXMOr5SR9pVDX5XmhLlZKa8w4o+ eNKYOIIR7Yq8WZmIvc4PZ2JF18lBOMKJA43YALCdXfes6n6h3h6es0uxTgKydLWdv20aB/ DScNO1AObuUyTJPwZC7df6CaFj1OyNk+Hst3DFr38UjHcI1QkIKF17OGN2gVOQ== X-Migadu-Spam-Score: 7.17 X-Spam-Score: 7.17 X-Migadu-Queue-Id: 84D6C31D49 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=WF3Abz6t; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: 2qT9p5W9jYb5 Fixes . Reported by 宋文武 . * guix/scripts/repl.scm (define-command): Before starting the REPL, run (current-profile) which makes available all channels. --- Hi, Instead I am proposing this, it avoids to load all the module. For testing, once applied to some Guix checkout, just run: $ ./pre-inst-env guix pull --disable-authentication -C /tmp/channels.scm -p /tmp/new $ echo '(use-modules (rde features))' | /tmp/new/bin/guix repl /dev/stdin where /tmp/channels.scm reads, (list (channel (name 'rde) (url "https://git.sr.ht/~abcdw/rde") (introduction (make-channel-introduction "257cebd587b66e4d865b3537a9a88cccd7107c95" (openpgp-fingerprint "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0")))) (channel (name 'guix) (url "/home/simon/src/guix/guix"))) tweaking the path to your Guix checkout. Cheers, simon guix/scripts/repl.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm index 787c63d48e..fc55d79c41 100644 --- a/guix/scripts/repl.scm +++ b/guix/scripts/repl.scm @@ -211,6 +211,7 @@ (define script ((guile) (save-module-excursion (lambda () + (current-profile) ;Run (%package-module-path) as explained above. (set-user-module) ;; Do not exit repl on SIGINT. ((@@ (ice-9 top-repl) call-with-sigint) base-commit: cb45e9d0dc6cbe6f69a858f71252411610b4ce82 -- 2.38.1