From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#25100: 'guix system reconfigure' fails when new generation already exists Date: Mon, 05 Dec 2016 21:35:40 +0100 Message-ID: <87a8ca15cz.fsf@gnu.org> References: <874m2lb98t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDzzZ-0000GF-Au for bug-guix@gnu.org; Mon, 05 Dec 2016 15:36:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDzzW-000676-7W for bug-guix@gnu.org; Mon, 05 Dec 2016 15:36:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:41918) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDzzW-00066b-4f for bug-guix@gnu.org; Mon, 05 Dec 2016 15:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cDzzV-0002I9-Vl for bug-guix@gnu.org; Mon, 05 Dec 2016 15:36:01 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <874m2lb98t.fsf@gmail.com> (Chris Marusich's message of "Sat, 03 Dec 2016 02:24:50 -0800") 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" To: Chris Marusich Cc: 25100-done@debbugs.gnu.org Hi! Chris Marusich skribis: > I've noticed that, in GuixSD, if one rolls back the system with 'guix > system roll-back' or switches to a previous generation with 'guix system > switch-generation', and then one tries to run 'guix system reconfigure', > the operation fails because the symlink for the new generation already > exists. I expected the operation to succeed and overwrite the existing > generation, since that mirrors the behavior of 'guix package'. > > Specifically, if the current generation is N and generation N+1 exists, > then running 'guix system reconfigure' should overwrite generation N+1 > with the new system. Currently, it fails to create the symlink. I've > attached a patch which modifies the behavior to be what I expected. Indeed. > From 526f78a38dabeb12196a21cebe174f073c217c12 Mon Sep 17 00:00:00 2001 > From: Chris Marusich > Date: Fri, 2 Dec 2016 01:52:04 -0800 > Subject: [PATCH] system: If the new system generation already exists, > overwrite it. > > * guix/scripts/system.scm (switch-to-system): Create the symlink to the n= ew > system generation using the procedure "switch-symlink" instead of "syml= ink". > That way, if the link already exists, we update it instead of failing. > > * doc/guix.texi (Using the Configuration System, Invoking guix system): > Document the behavior. [...] > +overwritten. This behavior mirrors that of @command{guix package} > +@pxref{Invoking guix package}. Note: @pxref is for parenthetical expressions (info "(texinfo) pxref"). I adjusted this and the commit log and committed. Thank you! Ludo=E2=80=99.