bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating user profiles


From: Andreas Enge
Subject: Re: Creating user profiles
Date: Sun, 13 Jan 2013 23:31:44 +0100
User-agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; )

Am Sonntag, 13. Januar 2013 schrieb Ludovic Courtès:

> Right, good point. (Apparently Nix’s manual doesn’t mention it either.)

> So here’s what I would do:

 

I simply applied the patch, and it seems to be part of the solution.

Upon a first run of "guix-package --list-available", I obtained the error message inviting me to create the directory, which I did. The next call succeeded. But now $HOME/.guix-profile points to the non-existing /usr/local/guix-git/var/nix/profiles/per-user/privat/guix-profile, and I get the error:

 

Backtrace:

In ice-9/boot-9.scm:

149: 9 [catch #t #<catch-closure 14e29c0> ...]

157: 8 [#<procedure 147e0f0 ()>]

In unknown file:

?: 7 [catch-closure]

In ice-9/boot-9.scm:

63: 6 [call-with-prompt prompt0 ...]

In ice-9/eval.scm:

407: 5 [eval # #]

In unknown file:

?: 4 [call-with-input-string "(apply (module-ref (resolve-interface '(guix-package)) 'guix-package) (cdr (command-line)))" ...]

In ice-9/command-line.scm:

174: 3 [#<procedure 1415500 at ice-9/command-line.scm:169:3 (port)> #<input: string 12a51a0>]

In unknown file:

?: 2 [eval (apply (module-ref # #) (cdr #)) #<directory (guile-user) 14e4d80>]

In /usr/local/bin/guix-package:

467: 1 [guix-package "--list-available"]

In unknown file:

?: 0 [symlink "/usr/local/guix-git/var/nix/profiles/per-user/privat/guix-profile" ...]

 

ERROR: In procedure symlink:

ERROR: In procedure symlink: File exists

 

The problem is that the call to "guix-package --list-available" does not actually create anything in the per-user profile directory.

 

After deleting $HOME/.guix-profile again and running "guix-package -i hello", the per-user profile directory contains a symbolic link guix-profile-1-link to a user environment in the nix store, and a symbolic link guix-profile to guix-profile-1-link, and $HOME/.guix-profile points to the right thing. Then "guix-package --list-available" succeeds.

 

Now I can even remove the hello package, since then the per-user profile directory contains a link to the empty user environment in the nix store.

 

I would suggest the following: Before making the $HOME/.guix-profile symlink, check for the guix-profile symlink in the per-user profile directory. If it does not exist, create it as a link to the empty user environment. So there will always be guix-profile-1-link linking to the empty directory, which might also be useful for roll back (never delete this first empty environment).

 

Andreas

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]