Hello, Mathieu Othacehe <othac...@gnu.org> skribis:
>> Hmm. Can we keep “image” persistent by default, and make ‘vm’ volatile >> by default? That way, ‘--volatile’ would only make sense for ‘image’, >> and ‘--persistent’ would only make sense for ‘vm’. (So we’d be adding >> just one option: ‘--persistent’.) >> >> WDYT? > > I'm not fan of adding antithetic options: --x and --no-x. There's an > attached patch introducing --volatile-image and --persistent-vm options, > and documenting them. It's maybe not that bad after all. [...] > From b0c84a411f9f23f4f1a4155ba5efa68cac9004a2 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe <othac...@gnu.org> > Date: Thu, 13 Jan 2022 11:35:40 +0100 > Subject: [PATCH 1/2] scripts: system: Rationalize persistency. > > Make sure that the images are created with a non volatile root by default and > the vm are created with a volatile root by default. Break the --volatile > option into --volatile-image and --persistent-vm options. > > * guix/scripts/system.scm (perform-action): Turn volatile? argument into > volatile-vm-root?. > (show-help): Introduce --volatile-image and --persistent-vm options instead of > --volatile. > (%default-options): Adapt it. > (%options): Handle those options. > (process-action): Honor them. > * doc/guix.texi (Invoking guix system): Adapt it accordingly. It’s maybe not that important but I’m not convinced about the extra “-image” and “-vm” suffixes; I don’t think it makes things clearer. [...] > - (option '("volatile") #f #f > + (option '("volatile-image") #f #f > + (lambda (opt name arg result) > + (alist-cons 'volatile-image-root? #t result))) As a rule of thumb, we should not remove an option without going through a deprecation period. So if we take that route, “volatile” should still be accepted, only with deprecation warning emitted. We can remove it entirely in 1.5.0 or so. Thanks! Ludo’.