From: ludo@gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich@gmail.com>
Cc: 25100-done@debbugs.gnu.org
Subject: bug#25100: 'guix system reconfigure' fails when new generation already exists
Date: Mon, 05 Dec 2016 21:35:40 +0100 [thread overview]
Message-ID: <87a8ca15cz.fsf@gnu.org> (raw)
In-Reply-To: <874m2lb98t.fsf@gmail.com> (Chris Marusich's message of "Sat, 03 Dec 2016 02:24:50 -0800")
Hi!
Chris Marusich <cmmarusich@gmail.com> 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 <cmmarusich@gmail.com>
> 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 new
> system generation using the procedure "switch-symlink" instead of "symlink".
> 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’.
prev parent reply other threads:[~2016-12-05 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-03 10:24 bug#25100: 'guix system reconfigure' fails when new generation already exists Chris Marusich
2016-12-05 20:35 ` Ludovic Courtès [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8ca15cz.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=25100-done@debbugs.gnu.org \
--cc=cmmarusich@gmail.com \
/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 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).