[Top][All Lists]

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

Re: guix-package --roll-back

From: Ludovic Courtès
Subject: Re: guix-package --roll-back
Date: Sat, 05 Jan 2013 20:20:46 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)


Nikita Karetnikov <address@hidden> 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 ‘guix-package -p xxx’.

> 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 = "1"
> scheme@(guile-user)> (readlink %current-profile)
> $3 = "/nix/var/nix/profiles/per-user/root/guix-profile-1-link"
> But fail for other inputs.

That’s 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 = #f

Yeah, that’s 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 ‘guix-package’:

  1. without -p, it uses the user’s default profile, by default

  2. with -p, it uses the specified profile (see tests/guix-package.sh,
     for an example).


reply via email to

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