Subject: Re: [bug#36555] [PATCH v2 0/3] Refactor out common behavior for system reconfiguration.

From: [email-masked] (Jakob L. Kreuze)
Date: Tue, 09 Jul 2019 15:07:20 -0400

I've implemented the features missing from 'switch-system-program',
'upgrade-services-program', and 'install-bootloader-program' and successfully
ran the new 'guix system reconfigure' in a virtual machine.

Also tests for 'switch-system-program' have been implement, but I realized that
I'll need to be a bit more clever to test 'upgrade-services-program' and
'install-bootloader-program' -- the latter, in particular, requires boot
parameters from the machine being tested at build time, so I suspect I'll have
to provide some constant boot parameters to avoid spinning up the virtual
machine outside of the test derivation.

Anyway, I've reverted a change in my previous patch series that updated
'upgrade-shepherd-services' to use 'call-with-service-upgrade-info', since I'd
neglected to check the parameters that it passes to 'mproc'. Basically, it _has_
to be called from 'upgrade-services-program', which already has some
functionality comparible to 'shepherd-service-upgrade'. If someone could take a
look and ensure that it sufficiently implements 'shepherd-service-upgrade', that
would be greatly appreciated.

On that note, I've changed 'upgrade-services-program' to collect Shepherd error
messages as it goes. Is this the right way to go about it? My thinking is that,
this way, both 'guix system reconfigure' and 'guix deploy' will be able to
report Shepherd errors without stopping half-way through because Shepherd errors
out. Either way, I believe this fixes the issue that Ricardo was having with
'guix deploy'.

Regards,
Jakob

Jakob L. Kreuze (3):
  guix system: Add 'reconfigure' module.
  guix system: Reimplement 'reconfigure'.
  tests: Add reconfigure system test.

 Makefile.am                         |   1 +
 gnu/local.mk                        |   1 +
 gnu/machine/ssh.scm                 | 229 +++++++---------------------
 gnu/tests/reconfigure.scm           |  99 ++++++++++++
 guix/scripts/system.scm             | 143 +++++------------
 guix/scripts/system/reconfigure.scm | 170 +++++++++++++++++++++
 6 files changed, 364 insertions(+), 279 deletions(-)
 create mode 100644 gnu/tests/reconfigure.scm
 create mode 100644 guix/scripts/system/reconfigure.scm

-- 
2.22.0