From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Rollback problems Date: Wed, 23 Jan 2013 21:48:46 +0100 Message-ID: <201301232148.46744.andreas@enge.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-01=_uyEAREYeFY++eP/" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7Fj-0008Bk-0Y for bug-guix@gnu.org; Wed, 23 Jan 2013 15:49:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty7Fc-0006P1-Jl for bug-guix@gnu.org; Wed, 23 Jan 2013 15:48:58 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:58059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7Fc-0006Om-A5 for bug-guix@gnu.org; Wed, 23 Jan 2013 15:48:52 -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: bug-guix@gnu.org --Boundary-01=_uyEAREYeFY++eP/ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --Boundary-01=_uyEAREYeFY++eP/ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 7bit

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

 

--Boundary-01=_uyEAREYeFY++eP/--