GNU bug report logs - #74980
Home container do not instantiate ~/.guix-profile

Previous Next

Package: guix;

Reported by: Gabriel Wicki <gabriel <at> erlikon.ch>

Date: Thu, 19 Dec 2024 21:16:01 UTC

Severity: normal

To reply to this bug, email your comments to 74980 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#74980; Package guix. (Thu, 19 Dec 2024 21:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel Wicki <gabriel <at> erlikon.ch>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 19 Dec 2024 21:16:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: bug-guix <at> gnu.org
Subject: Home container do not instantiate ~/.guix-profile
Date: Thu, 19 Dec 2024 22:12:44 +0100
Hi there!

Invoking a home container does not create ~/.guix-profile (which in my case
is symlinked to ~/.guix-home/profile).  This leads to a problem when
testing my Emacs configuration, since I there add
~/.guix-profile/share/emacs/site-lisp to its load path.

I guess referring to ~/.guix-profile seems the smart choice, since it
could also work on home environments where I added the necessary
packages "manually" to my user's profile, so I consider only having
~/.guix-home to be somewhat off.

Any ideas on this?  Is this intended behaviour?  Is my configuration off?




Information forwarded to bug-guix <at> gnu.org:
bug#74980; Package guix. (Thu, 19 Dec 2024 21:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 74980 <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: 74980 <at> debbugs.gnu.org
Subject: [PATCH] home: container: Create symlink to .guix-home/profile.
Date: Thu, 19 Dec 2024 22:00:28 +0100
* guix/scripts/home.scm: Create the symlink.

Change-Id: Ib299c53f7cd0ca6ad204325b5c150d579224afd7
---
 guix/scripts/home.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index b4c82d275f..50aaf2abf6 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -344,6 +344,10 @@ (define* (spawn-home-container home
            (primitive-load (string-append #$home "/activate"))
            (setenv "GUIX_NEW_HOME" #f)
 
+           (system* "ln" "-s"
+                    (string-append #$home-directory "/.guix-home/profile")
+                    (string-append #$home-directory "/.guix-profile"))
+
            (when term
              ;; Preserve TERM for proper interactive use.
              (setenv "TERM" term))

base-commit: c3290cee6add60b7e56f5f919d9498d78542790a
-- 
2.46.0





Information forwarded to bug-guix <at> gnu.org:
bug#74980; Package guix. (Sat, 21 Dec 2024 23:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 74980 <at> debbugs.gnu.org (full text, mbox):

From: "Danny Milosavljevic" <dannym <at> scratchpost.org>
To: 74980 <at> debbugs.gnu.org, gabriel <at> erlikon.ch
Subject: Re: bug#74980: [PATCH] home: container: Create symlink to
 .guix-home/profile.
Date: Sun, 22 Dec 2024 00:16:51 +0100 (CET)
Hi,

Gabriel Wicki wrote on 19.12.2024 22:00 (GMT +01:00):
> * guix/scripts/home.scm: Create the symlink.
> 
> Change-Id: Ib299c53f7cd0ca6ad204325b5c150d579224afd7
> ---
>  guix/scripts/home.scm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
> index b4c82d275f..50aaf2abf6 100644
> --- a/guix/scripts/home.scm
> +++ b/guix/scripts/home.scm
> @@ -344,6 +344,10 @@ (define* (spawn-home-container home
>             (primitive-load (string-append #$home "/activate"))
>             (setenv "GUIX_NEW_HOME" #f)
>  
> + (system* "ln" "-s"
> + (string-append #$home-directory "/.guix-home/profile")
> + (string-append #$home-directory "/.guix-profile"))

Isn't that dangerous?

What happens if you invoke "guix install xyz" after that?

That would have guix mutate the contents of ~/.guix-profile , even though the .guix-home/profile is derived from a declarative manifest, right?

Or does it at  least only swap out the link for a new .guix-profile directory ?

I'm too much of a chicken to try...

I mean I can see what you mean but I'm not sure that guix expects the user to do that.




This bug report was last modified 231 days ago.

Previous Next


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