From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: guix-package --roll-back Date: Sat, 05 Jan 2013 20:20:46 +0100 Message-ID: <87vcbbqvw1.fsf@gnu.org> References: <871uejyq9z.fsf@karetnikov.org> <874nj4sbfe.fsf@karetnikov.org> <87y5gf8sm1.fsf@gnu.org> <87hamy4yaj.fsf@karetnikov.org> <87pq1m5nxy.fsf@gnu.org> <87obh43j7r.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrZIY-0005c7-RW for bug-guix@gnu.org; Sat, 05 Jan 2013 14:20:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TrZIX-0001Mz-MU for bug-guix@gnu.org; Sat, 05 Jan 2013 14:20:50 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:22021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TrZIX-0001Mv-Fs for bug-guix@gnu.org; Sat, 05 Jan 2013 14:20:49 -0500 In-Reply-To: <87obh43j7r.fsf@karetnikov.org> (Nikita Karetnikov's message of "Fri, 04 Jan 2013 13:18:43 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org Hi, Nikita Karetnikov skribis: > It depends on how profiles are stored. It turned out that there are > several issues. By the way, what should I do to create a custom profile? The only way to manipulate profiles is via =E2=80=98guix-package -p xxx=E2= =80=99. > Both 'profile-rx' and 'profile-number' work fine when '%current-profile' > is used. > > scheme@(guile-user)> (define %current-profile "/nix/var/nix/profiles/per-= user/root/guix-profile") > scheme@(guile-user)> (profile-number %current-profile) > $2 =3D "1" > scheme@(guile-user)> (readlink %current-profile) > $3 =3D "/nix/var/nix/profiles/per-user/root/guix-profile-1-link" > > But fail for other inputs. That=E2=80=99s expected. > Here is what I used to create a bogus custom profile. > > # cd /home > # mkdir testdir > # cd testdir > # touch env-42 > # ln -s env-42 42-custom-profile > # ln -s 42-custom-profile guix-profile > > [...] > > scheme@(guile-user)> (define custom-profile "/home/testdir/guix-profile") > scheme@(guile-user)> (profile-number custom-profile) > $7 =3D #f Yeah, that=E2=80=99s expected. Basically, if you do guix-package -p /dev/null --roll-back it should fail with an error message saying that there is no previous profile or something like that. > So, what kinds of profiles should be supported? Maybe it's not possible > to create something like 'custom-profile' and there is no need to > bother. There are two ways to use =E2=80=98guix-package=E2=80=99: 1. without -p, it uses the user=E2=80=99s default profile, by default /nix/var/nix/profiles/per-user/$USER/guix-profile; 2. with -p, it uses the specified profile (see tests/guix-package.sh, for an example). Thanks, Ludo=E2=80=99.