From: zimoun <zimon.toutoune@gmail.com>
To: 50473@debbugs.gnu.org
Subject: bug#50473: Unordered ’%actions’ process from ’guix package’
Date: Wed, 08 Sep 2021 14:43:12 +0200 [thread overview]
Message-ID: <864kav2q73.fsf@gmail.com> (raw)
Hi,
Let consider:
$ guix package -S 17 -d 18
but
$ guix package -d 18 -S 17
does not the same thing. The '%actions' (roll-back, delete-generation,
switch-generation) are processed in reversed order as they appear on the
command-line -- because 'for-each' and 'assoc-ref'.
However, the transaction plan is always the same:
step0 process %actions
step1 remove
step2 install
step3 manifest
Therefore, I propose to split the 'for-each' on '%actions' (step0) into
fixed steps, such as the transaction always happens using this plan:
1. roll-back
2. switch-generation
3. delete-generation
4. remove
5. install
6. manifest
whatever the order in the command line.
On one hand, it reduces the "power" of combining '-S', '-d' and
'--roll-back'. On the other hand, it enforces commutativity which is
somehow what we want a transaction to be.
WDYT? I can come up with a patch. This initial issue had been reported
by bug#40549 [1].
(Note that an issue about short-name with optional argument can also
happen and tracked by bug#50472 [2].)
All the best,
simon
1: <http://issues.guix.gnu.org/40549>
2: <http://issues.guix.gnu.org/50472>
reply other threads:[~2021-09-08 12:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=864kav2q73.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=50473@debbugs.gnu.org \
/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).