all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas@enge.fr>
Cc: bug-guix@gnu.org
Subject: Re: Rollback problems
Date: Wed, 23 Jan 2013 23:58:46 +0100	[thread overview]
Message-ID: <87mwvzsdzt.fsf@gnu.org> (raw)
In-Reply-To: <201301232148.46744.andreas@enge.fr> (Andreas Enge's message of "Wed, 23 Jan 2013 21:48:46 +0100")

Andreas Enge <andreas@enge.fr> skribis:

> $ guix-package -i hello
>
> This creates a link $HOME/.guix-profile to $PERUSER/guix-profile; the 
> latter points to the newly created $PERUSER/guix-profile-1-link
>
> $ guix-package --roll-back
> error: no previous profile; not rolling back
>
> No links are changed. I think in this case, rollback should create the 
> "empty profile" and have $PERUSER/guix-profile-1-link point to it. 

And what if you roll back once you’re at the empty profile?

It seems more intuitive for me to error out like this, because there was
really nothing but nothingness before “hello” was installed.  :-)

WDYT?

> $ guix-package -i freetype
>
> This creates $PERUSER/guix-profile-2-link and updates the links as 
> expected.
>
> $ guix-package --roll-back
> switching from generation 2 to 1
>
> Unexpectedly, $PERUSER/guix-profile-2-link is not deleted, but 
> $PERUSER/guix-profile now points to $PERUSER/guix-profile-1-link.

This is expected (same behavior as nix-env.)  Profile generations are
not deleted unless you explicitly do so; this is what guarantees that
one can roll back anywhere they want.

Also, part of the plan is to have a ‘--switch-generation’ option, like
nix-env, which allows users to jump directly to the generation of their
choice.

> But we need to delete the second profile link, as shown by the
> following:
>
> $ guix-package -i file
> Now $PERUSER/guix-profile-3-link is created, pointing to an environment 
> containing hello and file.
>
> $ guix-package --roll-back
> switching from generation 3 to 2
>
> Now, we go back to generation 2, containing hello and the mysteriously 
> reappeared freetype.

Yes, I’ve thought about it, as noted in guix-package and
tests/guix-package.sh.  :-)

This could be solved by adding the number of the generation we come from
in each new manifest, and then getting the number of the generation to
roll-back to from the manifest (we’d then have a DAG of generations, as
opposed to a flat list.)

But I wonder if this is really worth the trouble.  In my experience, a
scenario like the one above rarely happens, if ever.

WDYT?

Thanks,
Ludo’.

  reply	other threads:[~2013-01-23 22:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 20:48 Rollback problems Andreas Enge
2013-01-23 22:58 ` Ludovic Courtès [this message]
2013-01-23 23:17   ` Andreas Enge
2013-01-24 11:34     ` Ludovic Courtès
2013-01-24 15:33       ` Alex Sassmannshausen
2013-01-24 15:59         ` Ludovic Courtès
2013-01-24 20:52       ` Ludovic Courtès
2013-01-25  2:44         ` Nikita Karetnikov
2013-01-25 13:54           ` Alex Sassmannshausen
2013-01-25 14:48             ` Andreas Enge
2013-01-25 14:53           ` Ludovic Courtès
2013-01-27 17:05         ` Ludovic Courtès
2013-01-28 22:10           ` Andreas Enge
2013-01-28 22:44             ` Ludovic Courtès
2013-01-25  3:08     ` Nikita Karetnikov
2013-01-27 17:06 ` 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=87mwvzsdzt.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=andreas@enge.fr \
    --cc=bug-guix@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.