[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Update: Implementing guix system rollback / switch-generation
From: |
Chris Marusich |
Subject: |
Update: Implementing guix system rollback / switch-generation |
Date: |
Fri, 08 Jul 2016 19:53:49 -0700 |
Hi Guix,
I've attached a preliminary patch which adds rudimentary roll-back and
switch-generation commands to "guix system". Currently, the commands
just flip symlinks, which is part of the first milestone that Ludo
suggested in the following thread:
https://lists.gnu.org/archive/html/guix-devel/2016-06/msg00178.html
Please let me know what you think. After getting feedback, I intend to
follow up a more complete patch that contains the following additional
changes:
* Regenerate grub.cfg, to complete the first milestone. I'm not sure
exactly how this will play out, but I imagine I'll need to use the
store somehow to get it done.
* Use a properly formatted ChangeLog-style Git commit message.
* Mention these new commands in the manual.
* Add tests. I'm not new to automated testing, but I haven't done it
using autoconf/make or in Guile, so tips here would be welcome!
* Add these new commands to the emacs interface.
I've tested the changes on my bare metal GuixSD installation. I would
have used a VM, but my system has trouble launching VMs. I first
verified manually that the roll-back command switched the profile's
symlink to the previous generation, by examining the output of
list-generations and ls. I then verified, in the same way, that the
switch-generation command switched the profile's symlink to the
specified generation. I verified that switch-generation works for
arbitrary numbers and relative numbers (note that a negative relative
number must be preceded by the special "--" argument to prevent it from
being interpreted as an option). I also verified that if the user
attempts to switch to a nonexistent generation (or to roll back from
generation 1 in the case of "guix system"), an error is raised without
modifying anything. I repeated this manual verification process for
both the "guix system" and "guix package" commands, since my changes
involve some refactoring in "guix package".
Thank you,
--
Chris
0001-Implement-system-roll-back-and-switch-generation-com.patch
Description: Text Data
signature.asc
Description: PGP signature
- Update: Implementing guix system rollback / switch-generation,
Chris Marusich <=