GNU logs - #67290, boring messages


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67290: (current-profile) only works when invoked as a process named "guix"
Resent-From: Ian Eure <ian@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 19 Nov 2023 21:25:02 +0000
Resent-Message-ID: <handler.67290.B.170042907828401 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 67290
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 67290 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guix@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.170042907828401
          (code B ref -1); Sun, 19 Nov 2023 21:25:02 +0000
Received: (at submit) by debbugs.gnu.org; 19 Nov 2023 21:24:38 +0000
Received: from localhost ([127.0.0.1]:52210 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r4pHQ-0007Nt-98
	for submit <at> debbugs.gnu.org; Sun, 19 Nov 2023 16:24:38 -0500
Received: from lists.gnu.org ([2001:470:142::17]:37502)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ian@HIDDEN>) id 1r4pHK-0007Nb-VP
 for submit <at> debbugs.gnu.org; Sun, 19 Nov 2023 16:24:34 -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 <ian@HIDDEN>) id 1r4pHD-0007Fs-Sa
 for bug-guix@HIDDEN; Sun, 19 Nov 2023 16:24:23 -0500
Received: from out1-smtp.messagingengine.com ([66.111.4.25])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ian@HIDDEN>) id 1r4pHB-0006eQ-Pe
 for bug-guix@HIDDEN; Sun, 19 Nov 2023 16:24:23 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id 92DDD5C0162
 for <bug-guix@HIDDEN>; Sun, 19 Nov 2023 16:24:17 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Sun, 19 Nov 2023 16:24:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:message-id:mime-version:reply-to:sender
 :subject:subject:to:to; s=fm3; t=1700429057; x=1700515457; bh=uO
 tgNN7YAUtuGDYWCt56jJ8jRXO0RX1Ft+V5G+Fogaw=; b=ytfy9cYDOfsEO2uyix
 apIOBWph5RZbcvw2kdVTKs4Ji2sQJ5+tFiqc9ccHQCvRXbVi6xx2k7AmSa9Bp4Wh
 9JNxCAjSSJ0WYlNTIAVCu52JjU6cvhw5k8TRYPmB06rL5jrPsWzT20IEFQ2GOjp2
 lmMxCbMmvCEmh6FVHdYRjOIemutDe1vcLVwDTM9hHFKPyEcyM4xUY2OLCozMpUqH
 +5JvSe5QpRw+7yqBqlQJBk6XVS/iRjjY4kbyFPFpt7Bp3hixrrAvOyeZbsLHhnN5
 fa3kZRqyIe/fZF2WkyRyNYGLNK11VhOGPvScxkEKrprEgTCjTdAXcjWOmXyYZhgr
 lY1Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:message-id:mime-version:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; t=1700429057; x=1700515457; bh=uOtgNN7YAUtuG
 DYWCt56jJ8jRXO0RX1Ft+V5G+Fogaw=; b=rJdX43BfHdFkdX+YCOgNaDfUCRtGh
 T3wSqO2yl40f08xjw50ywQEC5MwtGFImTEA2+6YzPfiJHuXZYSzsrGt3t6sQHbjP
 IlX3qb0JsudQC2eBotOMvNxPnZTM210oBEnZKKLdHR4cOzhIdKylGQKdVgNjoMcR
 JueHp0BeFDpHRFxFmr8ba0Lz82CTSmwNG7wlXldGgnZCBLak/1QCA2bPjp9Fj2Q6
 bWmp2IDBTBA/IfJpvmrWkXgekKUmOxTbWH1nI3+iCNVvMRQ7PjEVXR2ZUCanDf6K
 k9/x3fuP+RXa9+m62QuwUib81wcPFqW62yLGEQI/fD6TpOuCiO/DbH1nA==
X-ME-Sender: <xms:AX1aZVKETLx3M0k9oYIUZxVh0NbWtxnlCngRh37jVgB0SddB3Dj6Gw>
 <xme:AX1aZRIfBEv9hz8CqDkX6JlH7hZvQShGUdnsuuM1Wrr6wd4n6fEMUC02GQh2aHvj5
 OxD5-sp8v52bCmBfw>
X-ME-Received: <xmr:AX1aZdu-o9ySrUbw9Urrs4liq8-nYXUJCb6dBJadaWJ3FsazPDxu7XgfRgZPO9Qz09T17bJF3EJHsQyABL9tzdaGnv61elkTIuAp>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeggedgudeglecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgfgsehtqhertd
 dttdejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdht
 vheqnecuggftrfgrthhtvghrnhephffgtddtjeelgfffuddvhfeifeeltddtkeekkeegff
 ehgedtgeekhfeuledtffevnecuffhomhgrihhnpehgnhhurdhorhhgpdhgihhtlhgrsgdr
 tghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe
 hirghnsehrvghtrhhoshhpvggtrdhtvh
X-ME-Proxy: <xmx:AX1aZWZx-C8E3mnqcBRrvn_b4TgdxJUckEYNHOkr_D_Ph4KGboB9EQ>
 <xmx:AX1aZcaw9dyjdqh89DyfQ6ozz_Jhe-jgz8Aqqz3pUL_ao-I607PJpg>
 <xmx:AX1aZaDE3Pyz8RtqY_4VTdBO9kz2AM3OR_-xkxX6YqcQDlxNmGEJXQ>
 <xmx:AX1aZS1iMlYWzKCInTZtCx3ChLLKjiPfnEl0YIhkJyy3u3Skixceig>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-guix@HIDDEN>; Sun, 19 Nov 2023 16:24:16 -0500 (EST)
From: Ian Eure <ian@HIDDEN>
Date: Sun, 19 Nov 2023 13:24:13 -0800
Message-ID: <878r6tv3lu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=66.111.4.25; envelope-from=ian@HIDDEN;
 helo=out1-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.6 (/)
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: -0.4 (/)

When you invoke `guix repl', the current-profile and current-channels proce=
dures reflect my current profile and channel configuration:

    l0p!ieure~$ guix repl
    GNU Guile 3.0.9
    Copyright (C) 1995-2023 Free Software Foundation, Inc.

    Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
    This program is free software, and you are welcome to redistribute it
    under certain conditions; type `,show c' for details.

    Enter `,help' for help.
    scheme@(guix-user)> ,m (guix describe)
    scheme@(guix describe)> (current-profile)
    $1 =3D "/home/ieure/.config/guix/current"
    scheme@(guix describe)> (length (current-channels))
    $2 =3D 3
    scheme@(guix describe)>=20

If you run `guile', they do not:

    l0p!ieure~$ guile
    GNU Guile 3.0.9
    Copyright (C) 1995-2023 Free Software Foundation, Inc.

    Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
    This program is free software, and you are welcome to redistribute it
    under certain conditions; type `,show c' for details.

    Enter `,help' for help.
    scheme@(guile-user)> ,m (guix describe)
    scheme@(guix describe)> (current-profile)
    $1 =3D #f
    scheme@(guix describe)> (length (current-channels))
    $2 =3D 1
    scheme@(guix describe)>=20

The issue seems to be that current-profile checks the name of the program w=
hich was invoked, and always returns #f unless the name ends with "bin/guix=
".  Since "guile" doesn=E2=80=99t, they don=E2=80=99t work as expected.  Se=
e: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/describe.scm#n64

I discovered this when I was using emacs-guix to debug one of my package de=
finitions, which inherits from a package in a non-default channel.  While I=
 can load the .scm file into Geiser no matter what channels are configured,=
 it can=E2=80=99t use the module containing the package definition it inher=
its from.  This also appears to be the root cause behind this three-year-ol=
d bug report for emacs-guix: https://gitlab.com/emacs-guix/emacs-guix/-/iss=
ues/17

I=E2=80=99m not sure what the rationale is for this behavior, so I don=E2=
=80=99t have a suggestion for a fix, but it=E2=80=99s definitely a bug.

Thanks,

  =E2=80=94 Ian




Message sent:


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: Ian Eure <ian@HIDDEN>
Subject: bug#67290: Acknowledgement ((current-profile) only works when
 invoked as a process named "guix")
Message-ID: <handler.67290.B.170042907828401.ack <at> debbugs.gnu.org>
References: <878r6tv3lu.fsf@HIDDEN>
X-Gnu-PR-Message: ack 67290
X-Gnu-PR-Package: guix
Reply-To: 67290 <at> debbugs.gnu.org
Date: Sun, 19 Nov 2023 21:25: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.

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 67290 <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
67290: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67290
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67290: (current-profile) only works when invoked as a process named "guix"
Resent-From: Simon Tournier <zimon.toutoune@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Fri, 12 Jan 2024 12:52:05 +0000
Resent-Message-ID: <handler.67290.B67290.170506389116157 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67290
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Ian Eure <ian@HIDDEN>, 67290 <at> debbugs.gnu.org
Received: via spool by 67290-submit <at> debbugs.gnu.org id=B67290.170506389116157
          (code B ref 67290); Fri, 12 Jan 2024 12:52:05 +0000
Received: (at 67290) by debbugs.gnu.org; 12 Jan 2024 12:51:31 +0000
Received: from localhost ([127.0.0.1]:35162 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rOH0U-0004CS-9e
	for submit <at> debbugs.gnu.org; Fri, 12 Jan 2024 07:51:31 -0500
Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:41376)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1rOH0O-0004Al-Ao
 for 67290 <at> debbugs.gnu.org; Fri, 12 Jan 2024 07:51:25 -0500
Received: by mail-wm1-x32f.google.com with SMTP id
 5b1f17b1804b1-40e544fac26so5468375e9.1
 for <67290 <at> debbugs.gnu.org>; Fri, 12 Jan 2024 04:51:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1705063880; x=1705668680; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :from:to:cc:subject:date:message-id:reply-to;
 bh=GcMbZvtUGECbHo4f7qGImnmXgNW9/oNMFnGIoleegX4=;
 b=jfhxhTeGnPIuVIZKpL0sLkzcf8Batmjc3mfRWbIrs9w47XhZJs/A5L5OaSr41gJvaD
 YwslxC574WdXEbyiXmFlqhPIGzU5N3xNBkqiJs/aO/8LOGZRSyBEkHTi9fvA11DHngsq
 YvB/SgKfmQJ6U+u3kfxTNqE8s4h09TwczTUdxrogFOOQfbgaTDV+IemeBdarkHoM9lCP
 TgTu72Wmspl6ekpVaN3uWYV83I/1gCdfdyeIi7PzdqdPDJDCkcc3Jf3DI4df7DUGkXeQ
 UL0k0O54xMhLjDR5Pur3y9WeeTSeOCuD4aPyxY3camTAaqlV6EXJC/znlivjA7Iotv3j
 ge9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1705063880; x=1705668680;
 h=mime-version:message-id:date:references:in-reply-to:subject:to:from
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=GcMbZvtUGECbHo4f7qGImnmXgNW9/oNMFnGIoleegX4=;
 b=clf8GvJIL87JDyr2S8ZFFG/eP3dg/vzOW+Rm1JBrEX39dpj+jIVycVXz9JiCcFThge
 qjFRlWFCsGKDCf1zOTyx64de3V/O8xN5Mlm+Ygluzf3D8MQrQ/NXPet2v9ildm7aun8S
 oc+nRoO2nDIeGmaG36UUUNv5YI6xqD/gPaMuVsg6yGE70ZGLeYaBDKf+QIYbm4cQv9au
 cH3VhPfQ6A9kXkNE4QNsdT8fnpyOg/CAfPjpjd93oDQ0NQg6RoCRjYnyYNGYRtApS4OL
 XMNTn54UngLmHg7nDTtoK5jadhMD0F6nJZ79897PcoUCB03ewWr3pQW2rO/KLMB98Yf7
 hhyg==
X-Gm-Message-State: AOJu0YxMhXTYeu7WiN0lI3J9JeneP89Nbfnpb40QecZHhpbGKjmIvMb9
 +11mUhVkJyn5kXHC+kP2NrCxtZRqVh8=
X-Google-Smtp-Source: AGHT+IEWEVyOr7ByhgGskPGVtnO2YVzyD7bbbftBMl95UFFDxbPB1ht+aQjz08W2Gp1Xvn4m24V1Bw==
X-Received: by 2002:a05:600c:3542:b0:40e:424d:5887 with SMTP id
 i2-20020a05600c354200b0040e424d5887mr1164590wmq.0.1705063880643; 
 Fri, 12 Jan 2024 04:51:20 -0800 (PST)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 h6-20020a05600c350600b0040c6d559490sm5691204wmq.3.2024.01.12.04.51.20
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 12 Jan 2024 04:51:20 -0800 (PST)
From: Simon Tournier <zimon.toutoune@HIDDEN>
In-Reply-To: <878r6tv3lu.fsf@HIDDEN>
References: <878r6tv3lu.fsf@HIDDEN>
Date: Fri, 12 Jan 2024 12:17:13 +0100
Message-ID: <87r0imx0li.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
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 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,

On Sun, 19 Nov 2023 at 13:24, Ian Eure <ian@HIDDEN> wrote:

> The issue seems to be that current-profile checks the name of the
> program which was invoked, and always returns #f unless the name ends
> with "bin/guix".  Since "guile" doesn=E2=80=99t, they don=E2=80=99t work =
as expected.
> See:
> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/describe.scm#n64

About current-profile, maybe this patch:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=p.patch
Content-Description: p.patch

diff --git a/guix/describe.scm b/guix/describe.scm
index 65cd79094b..4147d5db1f 100644
--- a/guix/describe.scm
+++ b/guix/describe.scm
@@ -61,14 +61,18 @@ (define current-profile
 or #f if this is not applicable."
     (match initial-program-arguments
       ((program . _)
-       (and (string-suffix? "/bin/guix" program)
-            ;; Note: We want to do _lexical dot-dot resolution_.  Using ".."
-            ;; for real would instead take us into the /gnu/store directory
-            ;; that ~/.config/guix/current/bin points to, whereas we want to
-            ;; obtain ~/.config/guix/current.
-            (let ((candidate (dirname (dirname program))))
-              (and (file-exists? (string-append candidate "/manifest"))
-                   candidate)))))))
+       (or (and (string-suffix? "/bin/guix" program)
+                ;; Note: We want to do _lexical dot-dot resolution_.  Using ".."
+                ;; for real would instead take us into the /gnu/store directory
+                ;; that ~/.config/guix/current/bin points to, whereas we want to
+                ;; obtain ~/.config/guix/current.
+                (let ((candidate (dirname (dirname program))))
+                  (and (file-exists? (string-append candidate "/manifest"))
+                       candidate)))
+           (let ((current (string-append
+                           (config-directory #:ensure? #f) "/current/manifest")))
+             (and (file-exists? current)
+                  current)))))))
 
 (define (current-profile-date)
   "Return the creation date of the current profile (produced by 'guix pull'),

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


?

Well, I do not know exactly if fixing your issue does not introduce
regression.

About emacs-guix, instead of launching Guile, why not start =E2=80=9Cguix
repl=E2=80=9D instead?  The command =E2=80=9Cguix repl=E2=80=9D had been im=
proved =E2=80=93 and maybe
even introduced after the release of emacs-guix.  Somehow, I am not very
happy with the current integration between Geiser and Guix. :-)

Cheers,
simon



--=-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67290: (current-profile) only works when invoked as a process named "guix"
Resent-From: Ian Eure <ian@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 13 Jan 2024 20:52:01 +0000
Resent-Message-ID: <handler.67290.B67290.170517911719798 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 67290
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 67290 <at> debbugs.gnu.org
Received: via spool by 67290-submit <at> debbugs.gnu.org id=B67290.170517911719798
          (code B ref 67290); Sat, 13 Jan 2024 20:52:01 +0000
Received: (at 67290) by debbugs.gnu.org; 13 Jan 2024 20:51:57 +0000
Received: from localhost ([127.0.0.1]:41223 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rOkyy-00059G-Sl
	for submit <at> debbugs.gnu.org; Sat, 13 Jan 2024 15:51:57 -0500
Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:45901)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ian@HIDDEN>) id 1rOkyw-000592-Bu
 for 67290 <at> debbugs.gnu.org; Sat, 13 Jan 2024 15:51:55 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 4D4563200A20
 for <67290 <at> debbugs.gnu.org>; Sat, 13 Jan 2024 15:51:49 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sat, 13 Jan 2024 15:51:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h=
 cc:content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm1; t=1705179108;
 x=1705265508; bh=OHNbl6lbzmNu2AgAvuQ5Vj08LqRrhXy6xyiiOEJybN0=; b=
 t8pF/hf9WENO3rcygxOW9qLiuITCrF1Bcselbj2vjskkkEfJIJqsmEzGP2ewdggL
 F74BhgRj/haRsElMdjfb2zTHesHHCzZeeKxNg4FvoIu6IXETQYYXOYYVE27m9DYa
 ypHSsPSMvdQezP6zApBcwbUtHBx5OYuwd/ukvzlnNadiKulFIkruX3jJzUXMnbhq
 yYc0r+XDwWT4/iheaIhnzMtOjFN2Tft2/w5ypJk4yUZKEyYWhOMO90iyJsuRLUrG
 pgM1r1n4FYlfCEtcfj9QMCGOf1XQd5YQtJDu3r2U25mtT6b1v37pyo/gfsT2TRKM
 ho3+5K7bxafXgxSYCcD2Qw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1705179108; x=
 1705265508; bh=OHNbl6lbzmNu2AgAvuQ5Vj08LqRrhXy6xyiiOEJybN0=; b=5
 1ftxoC4SaZDcRfcvcCvJpg6YPiAqzHXubMkMyd7N2QkSMMdcdS4RrK8SwtAUsRO+
 FZx7q2TLi8YgI44Kk5xo/umYCiK/2CY2/zuh5Rk3vNIHv/JWlHMS3Zia6lyud3dE
 YmCIfh1UAhmD9yTeM3EcKXyatwHnyHkIkgZeUGY53GIES4KwYnUK0PDGD9BPjcL2
 GFIpkw944dVUBjcr0sKFHyTxirckEHKzIXYZld3M9r7FF0XeTy+SuuaJRq7Rj2K+
 9EIYsbNqFuaSuLHAJIQMMglk5HCWQldlyVefO6qdsz2D5BgLnJvU3D/nHk5GxpCQ
 xr6iHdS57c58iRn/agjWA==
X-ME-Sender: <xms:5PeiZWAkB54_gzrAQKPG5sKtxlAVuQLcH8-7G1_GKF9qEFVAjdEFAA>
 <xme:5PeiZQjZLsQiDsTr8pj9B5ijMKQ3m6s9N1Am4e--793NQkt_vDqfH1rIWLRlTEBkt
 U6ZyYxmc38E0iR92g>
X-ME-Received: <xmr:5PeiZZnwr5lhT9nZjj_UzZWjE7xyuV04c75gksxqUFWSAqIz-z1NGQAXNUFmzPG7I_n46ygjjZRVu1PyQyrjdLND7Vev1RU4wXI>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeijedgudegfecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvufffjgfkgggtgfesth
 hqredttderjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv
 tgdrthhvqeenucggtffrrghtthgvrhhnpeffieegvdfgueevjeevkeeugefftefhhefhve
 efgeehgeetheektedujeegveegfeenucffohhmrghinhepghhnuhdrohhrghenucevlhhu
 shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrh
 hoshhpvggtrdhtvh
X-ME-Proxy: <xmx:5PeiZUxTAkJcGBz14P1BC1Kw-WRMfXwVQwZfVf5aXuDNtv609FptIA>
 <xmx:5PeiZbSDJyBCPalmy9gMZXVyHE6SYRBH99B2cTdWLqOVat8iEBVeZQ>
 <xmx:5PeiZfZn_TNk2INVrTkCkoDoTSdoEQ-AF3xscW6Ar36kzayaSl2F_A>
 <xmx:5PeiZeMkwigDmL7q_8MzUFgW47Kd1Ldce9mZK_vU2WTLICejJ2HIqg>
Feedback-ID: id9014242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <67290 <at> debbugs.gnu.org>; Sat, 13 Jan 2024 15:51:48 -0500 (EST)
References: <878r6tv3lu.fsf@HIDDEN> <87r0imx0li.fsf@HIDDEN>
User-agent: mu4e 1.10.8; emacs 29.1
From: Ian Eure <ian@HIDDEN>
Date: Sat, 13 Jan 2024 12:46:43 -0800
In-reply-to: <87r0imx0li.fsf@HIDDEN>
Message-ID: <87jzodq7ml.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
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.7 (-)


Simon Tournier <zimon.toutoune@HIDDEN> writes:

> Hi,
>
> On Sun, 19 Nov 2023 at 13:24, Ian Eure <ian@HIDDEN> wrote:
>
>> The issue seems to be that current-profile checks the name of=20
>> the
>> program which was invoked, and always returns #f unless the=20
>> name ends
>> with "bin/guix".  Since "guile" doesn=E2=80=99t, they don=E2=80=99t work=
 as=20
>> expected.
>> See:
>> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/describe.scm#n64
>
> About current-profile, maybe this patch:
>
> [2. p.patch --- text/x-diff; p.patch]
> diff --git a/guix/describe.scm b/guix/describe.scm
> index 65cd79094b..4147d5db1f 100644
> --- a/guix/describe.scm
> +++ b/guix/describe.scm
> @@ -61,14 +61,18 @@ (define current-profile
>  or #f if this is not applicable."
>      (match initial-program-arguments
>        ((program . _)
> -       (and (string-suffix? "/bin/guix" program)
> -            ;; Note: We want to do _lexical dot-dot=20
> resolution_.  Using ".."
> -            ;; for real would instead take us into the=20
> /gnu/store directory
> -            ;; that ~/.config/guix/current/bin points to,=20
> whereas we want to
> -            ;; obtain ~/.config/guix/current.
> -            (let ((candidate (dirname (dirname program))))
> -              (and (file-exists? (string-append candidate=20
> "/manifest"))
> -                   candidate)))))))
> +       (or (and (string-suffix? "/bin/guix" program)
> +                ;; Note: We want to do _lexical dot-dot=20
> resolution_.  Using ".."
> +                ;; for real would instead take us into the=20
> /gnu/store directory
> +                ;; that ~/.config/guix/current/bin points to,=20
> whereas we want to
> +                ;; obtain ~/.config/guix/current.
> +                (let ((candidate (dirname (dirname program))))
> +                  (and (file-exists? (string-append candidate=20
> "/manifest"))
> +                       candidate)))
> +           (let ((current (string-append
> +                           (config-directory #:ensure? #f)=20
> "/current/manifest")))
> +             (and (file-exists? current)
> +                  current)))))))
>=20=20
>  (define (current-profile-date)
>    "Return the creation date of the current profile (produced by=20
>    'guix pull'),
>
>
> ?
>
> Well, I do not know exactly if fixing your issue does not=20
> introduce
> regression.
>

The patch looks good to me, but this is all stuff I=E2=80=99m not very=20
familiar with.


> About emacs-guix, instead of launching Guile, why not start=20
> =E2=80=9Cguix
> repl=E2=80=9D instead?  The command =E2=80=9Cguix repl=E2=80=9D had been =
improved =E2=80=93 and=20
> maybe
> even introduced after the release of emacs-guix.  Somehow, I am=20
> not very
> happy with the current integration between Geiser and Guix. :-)
>

I=E2=80=99m not sure why it works the way it does, or whether it could be=20
changed to invoke `guix repl'.

I don=E2=80=99t think it=E2=80=99s expected for library code behavior to ch=
ange=20
depending on the runtime context, so I believe fixing Guix is the=20
right solution.  Perhaps the concerns around resolving relative=20
paths belongs somewhere more proximate to where that=E2=80=99s an issue?=20
I definitely don=E2=80=99t understand everything happening in this code,=20
but it strikes me as a concern relevant to some operations=20
executed from the CLI.  If that=E2=80=99s the case, putting it in the CLI=20
tooling where special handling is needed would make sense to me.

  =E2=80=94 Ian





Last modified: Sat, 20 Jan 2024 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.