From: Andreas Enge <andreas@enge.fr>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: bug-guix@gnu.org
Subject: Re: Creating user profiles
Date: Sun, 13 Jan 2013 23:31:44 +0100 [thread overview]
Message-ID: <201301132331.44244.andreas@enge.fr> (raw)
In-Reply-To: <87libwrb66.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2512 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 8820 bytes --]
next prev parent reply other threads:[~2013-01-13 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-13 13:23 Creating user profiles Andreas Enge
2013-01-13 22:05 ` Ludovic Courtès
2013-01-13 22:31 ` Andreas Enge [this message]
2013-01-13 22:45 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201301132331.44244.andreas@enge.fr \
--to=andreas@enge.fr \
--cc=bug-guix@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.