unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* Rollback problems
@ 2013-01-23 20:48 Andreas Enge
  2013-01-23 22:58 ` Ludovic Courtès
  2013-01-27 17:06 ` Ludovic Courtès
  0 siblings, 2 replies; 16+ messages in thread
From: Andreas Enge @ 2013-01-23 20:48 UTC (permalink / raw
  To: bug-guix

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

Rollback does not quite work as expected for me. I am starting without 
.guix-profile in the home directory, and an empty directory 
$PREFIX/var/nix/profiles/per-user/$USER (which I will shorten to $PERUSER 
in the following).

$ 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. 
Alternatively, the empty profile could be created in the beginning, so that 
installing hello would actually create profile number 2. (I think this 
would be the cleanest solution: Upon creation of $HOME/.guix-profile and 
$PERUSER/guix-profile, create a first empty profile $PERUSER/guix-
profile-1-link, and the rollback code could stay the same.)

$ 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. 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.

Andreas

[-- Attachment #2: Type: text/html, Size: 6350 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-01-28 22:44 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 20:48 Rollback problems Andreas Enge
2013-01-23 22:58 ` Ludovic Courtès
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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).