unofficial mirror of 
 help / color / mirror / Atom feed
* bug#50473: Unordered ’%actions’ process from ’guix package’
@ 2021-09-08 12:43 zimoun
  0 siblings, 0 replies; only message in thread
From: zimoun @ 2021-09-08 12:43 UTC (permalink / raw)
  To: 50473


Let consider:

    $ guix package -S 17 -d 18


    $ 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,

1: <>
2: <>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-08 12:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08 12:43 bug#50473: Unordered ’%actions’ process from ’guix package’ zimoun

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 NNTP newsgroup(s).