From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iPXOCHmwOGEJvwAAgWs5BA (envelope-from ) for ; Wed, 08 Sep 2021 14:45:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mGywBHmwOGEdLQAAB5/wlQ (envelope-from ) for ; Wed, 08 Sep 2021 12:45:45 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 963DB24B01 for ; Wed, 8 Sep 2021 14:45:44 +0200 (CEST) Received: from localhost ([::1]:35924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNwxT-0005Jh-Od for larch@yhetil.org; Wed, 08 Sep 2021 08:45:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNwvq-0003Vl-5I for bug-guix@gnu.org; Wed, 08 Sep 2021 08:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNwvp-0005p0-T0 for bug-guix@gnu.org; Wed, 08 Sep 2021 08:44:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNwvp-0001p5-Px for bug-guix@gnu.org; Wed, 08 Sep 2021 08:44:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50473: Unordered =?UTF-8?Q?=E2=80=99%actions=E2=80=99?= process from =?UTF-8?Q?=E2=80=99guix_?= =?UTF-8?Q?package=E2=80=99?= Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 08 Sep 2021 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50473 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50473@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16311050056939 (code B ref -1); Wed, 08 Sep 2021 12:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Sep 2021 12:43:25 +0000 Received: from localhost ([127.0.0.1]:58862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNwvE-0001np-TE for submit@debbugs.gnu.org; Wed, 08 Sep 2021 08:43:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:34706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNwvD-0001ni-Fy for submit@debbugs.gnu.org; Wed, 08 Sep 2021 08:43:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNwvD-0002Cd-37 for bug-guix@gnu.org; Wed, 08 Sep 2021 08:43:23 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:38457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNwvB-0005Nj-9n for bug-guix@gnu.org; Wed, 08 Sep 2021 08:43:22 -0400 Received: by mail-wm1-x335.google.com with SMTP id k5-20020a05600c1c8500b002f76c42214bso1495835wms.3 for ; Wed, 08 Sep 2021 05:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=JLzO5smS4TTchNQpfKyt8tDMkWJifOXlsS1xrWg39n0=; b=P/VOS7XvxQTwrbzM+r23CsOOIMakEhMMRY4S6V+PQuub7sHO6QbiU7iEnpA8pT918m bCzHlgPEjBaAdTedSIf4Dv+LuTC3droj0XFVbEFDnoa0IT09+p/r6a1128T8vFQFm/3w BBhVOTGMxbpFf3fcvvv72lgdkFms5t17dWvfqJuSs/9BBemmOk/74n83FuAEwerfbERp 4nMsmfknQIV90DLMKogshYIDnu5pEGWrIiZyvprxUUvH4RUP21Hwaf/znRCRea8Ob9qa 8nETOp4C19JkiyPCoEaELTP1yDkz3UamKB0TY6BeefuTwbTQtRguZz31d8Pgh0lRuq8I 7NgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=JLzO5smS4TTchNQpfKyt8tDMkWJifOXlsS1xrWg39n0=; b=MBJNA/XYYQtF2Wb5vBVXH3ubXrNplHJdRyk7b+cJI4vLGivPwO/iR68hg8lmvsyB32 gfjVsShBdyyIgL9DpRmrflJokL4fcQ5sVqhyoJnhVzWmSeGm09r2ZSZT+6DlZM1ZwJyg Fz0mo8YQNuAH2ma97YiyPQW+hUJZxc2OS/dsD18j1UkLv1xnbNm2jcdWCVD0VwfedFXY +5lGswpRfXzxy9wninh/tGivUcvAfETlLEu1Q5ij2MPodXr4wHpv2ORuOgfO2xQ0XZ8X YxB+Abevdrn7gBJTheBatjs874npQ0zBw3lxbfuE8UJ3NZldhNbLiPJprZSLCC/Is11s GAXw== X-Gm-Message-State: AOAM531W2I8R8iui9Kj00ZPtozVE7qfXZKUsHFLwlaIHH+emspNjs9tv LypCnDhfbm49+3Hx0gg92qDNTd/X/oI= X-Google-Smtp-Source: ABdhPJyucbCqPAOByy60t6oPPBbObE1+BSdpNoeqdRKlP8FvaG6QZlDZ46pMe/fwS0l4VvUffITwDw== X-Received: by 2002:a05:600c:4fc1:: with SMTP id o1mr3479776wmq.4.1631104999961; Wed, 08 Sep 2021 05:43:19 -0700 (PDT) Received: from jack-Precision-7820-Tower ([193.48.40.117]) by smtp.gmail.com with ESMTPSA id r129sm1947146wmr.7.2021.09.08.05.43.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 05:43:19 -0700 (PDT) From: zimoun Date: Wed, 08 Sep 2021 14:43:12 +0200 Message-ID: <864kav2q73.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631105144; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=JLzO5smS4TTchNQpfKyt8tDMkWJifOXlsS1xrWg39n0=; b=IOjfEVOpXkeyPYLnm7KjWoG1Kkd38eVuR6EXpBUmkbfiVxjh4J0FyR8mgfIeRgOPbFEygv 2+8G7PZlbthQ6m5nuYxpUmRNNQpkS4ZvMStIl8h7mGFxJ3+bYeJRSYnO5Ax6lQToAYEjSD BggRiL+xXjPW+PSaYbhlr1vCDJprK0WCdbPZ8z/sksrKiOmlgcwiUa18ktDhhbMJ7MBjjp fKPBH4xme/CoZA/GlAjniTb1MSckXy9skjghJ4IL+5UzaUOMs1UGhDuyJuVQ5+xNZ1Vtit 6LPpSkIJj/uE2vlWX9Lh/8c4YY/P2pzzu7yUW/ho4AHKnZI4w1RCBsnufbXffQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631105144; a=rsa-sha256; cv=none; b=GyCNB6jDKnWYjoOhQz0GAcjV2kP0xIzkZGQD5XGqCsFtkg6dBCAEe0HrPxTDXwsFh9xVXz u3sSTsR+v0lMJl3qKMXHLm64n9Pcz95GFkcTiCLJlPPOzOr75ymiSIGK2fHtZ01Npt8H0C 9Imk44UELPUT+8EshGv84gie6B00nzPO5pFBfkchOaxKZ6gfZN0rMQteIA7MJgqa7XOI15 L9fYmBw9CLwCdVqCjpij2CB5rKlNwECqe21zXA+8U01OuaPGZP2Hjxeay/y2CbnV+QhjEV esnHBPDZEaWYTDLFsE3uG1cBMxY6kJZsJPb/IPW3NknsK27VouyPQSgwm7i1hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="P/VOS7Xv"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="P/VOS7Xv"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 963DB24B01 X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: hX9UqDXfcc5E 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: 2: