From 0ec1af59e564c00fb48359fec84d049138589dee Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 14 Jan 2013 23:44:58 +0100 Subject: guix-package: Create or diagnose missing profile directory. Reported by Andreas Enge. * guix-package.in (%profile-directory): Honor $NIX_STATE_DIR. (guix-package)[ensure-default-profile]: Use it. [process-actions]: Call it when the `profile' option is %CURRENT-PROFILE. * tests/guix-package.sh: Add installation test with $HOME set, using the default profile. --- doc/guix.texi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 3b850d91b4..7de7f4f0c2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -444,11 +444,23 @@ previous generations of the profile remain available, should the user want to roll back. For each user, a symlink to the user's default profile is automatically -created in @file{$HOME/.guix-profile}. This symlink always point to the +created in @file{$HOME/.guix-profile}. This symlink always points to the current generation of the user's default profile. Thus, users can add @file{$HOME/.guix-profile/bin} to their @code{PATH} environment variable, and so on. +In a multi-user setup, user profiles must be stored in a place +registered as a @dfn{garbage-collector root}, which +@file{$HOME/.guix-profile} points to (@pxref{Invoking guix-gc}). That +directory is normally +@code{@var{localstatedir}/profiles/per-user/@var{user}}, where +@var{localstatedir} is the value passed to @code{configure} as +@code{--localstatedir}, and @var{user} is the user name. It must be +created by @code{root}, with @var{user} as the owner. When it does not +exist, @command{guix-package} emits an error about it. + +The @var{options} can be among the following: + @table @code @item --install=@var{package} -- cgit v1.2.3