GNU bug report logs - #44931
[PATCH 0/1] upgrade: Allow several regexps (fix #44928).

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Sat, 28 Nov 2020 20:27:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44931 in the body.
You can then email your comments to 44931 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#44931; Package guix-patches. (Sat, 28 Nov 2020 20:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to zimoun <zimon.toutoune <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 28 Nov 2020 20:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 0/1] upgrade: Allow several regexps (fix #44928).
Date: Sat, 28 Nov 2020 21:26:31 +0100
Dear,

Fixes <https://bugs.gnu.org/44928> describing that the 2nd raises an error:

  $ guix upgrade foo bar
  guix upgrade: error: bar: extraneous argument

And it is not the case with "guix package -u foo bar".  I am not convinced by
the patch but after thinking a bit, the 'match' does not seem necessary
because the options are correctly handled by SRFI-37 and any extra term is
potentially an other regexp.  The 'opts' is correctly formed and then
"guix-package" does all the job.

Well, I have been too lazy to create something in the test suite; someone
should do. :-)  Testing "guix package --upgrade" and "guix upgrade".  Maybe a
v2 of this tiny patch? ;-)


Feedback welcome.

All the best,
simon


zimoun (1):
  upgrade: Allow several regexps.

 guix/scripts/upgrade.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)


base-commit: 8ea2d7c2fa4d4ad7b4cf522fa259561beeeda072
-- 
2.29.2





Information forwarded to guix-patches <at> gnu.org:
bug#44931; Package guix-patches. (Sat, 28 Nov 2020 20:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 44931 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 44931 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 1/1] upgrade: Allow several regexps.
Date: Sat, 28 Nov 2020 21:32:45 +0100
Fixes <https://bugs.gnu.org/44928>.
Reported by Luis Felipe <luis.felipe.la <at> protonmail.com>.

* guix/scripts/upgrade.scm (guix-upgrade): Allow several regexps and remove
"extraneous arguement" check.
---
 guix/scripts/upgrade.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/upgrade.scm b/guix/scripts/upgrade.scm
index dcbcb2ab09..0eaae01e46 100644
--- a/guix/scripts/upgrade.scm
+++ b/guix/scripts/upgrade.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -76,13 +77,9 @@ This is an alias for 'guix package -u'.\n"))
   (define (handle-argument arg result arg-handler)
     ;; Accept at most one non-option argument, and treat it as an upgrade
     ;; regexp.
-    (match (assq-ref result 'upgrade)
-      (#f
-       (values (alist-cons 'upgrade arg
-                           (alist-delete 'upgrade result))
+    (values (alist-cons 'upgrade arg
+                           (delete '(upgrade . #f) result))
                arg-handler))
-      (_
-       (leave (G_ "~A: extraneous argument~%") arg))))
 
   (define opts
     (parse-command-line args %options
-- 
2.29.2





Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Tue, 01 Dec 2020 10:37:01 GMT) Full text and rfc822 format available.

Notification sent to zimoun <zimon.toutoune <at> gmail.com>:
bug acknowledged by developer. (Tue, 01 Dec 2020 10:37:02 GMT) Full text and rfc822 format available.

Message #13 received at 44931-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 44931-done <at> debbugs.gnu.org
Subject: Re: [bug#44931] [PATCH 1/1] upgrade: Allow several regexps.
Date: Tue, 01 Dec 2020 11:36:02 +0100
Hey zimoun,

> +    (values (alist-cons 'upgrade arg
> +                           (delete '(upgrade . #f) result))

I fixed the indentation and the matching commentary and pushed as
86971616c139597ffa9e20acc75533ff90176450.

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#44931; Package guix-patches. (Tue, 01 Dec 2020 12:44:02 GMT) Full text and rfc822 format available.

Message #16 received at 44931-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 44931-done <at> debbugs.gnu.org
Subject: Re: [bug#44931] [PATCH 1/1] upgrade: Allow several regexps.
Date: Tue, 01 Dec 2020 13:42:59 +0100
Hi Mathieu,

On Tue, 01 Dec 2020 at 11:36, Mathieu Othacehe <othacehe <at> gnu.org> wrote:

>> +    (values (alist-cons 'upgrade arg
>> +                           (delete '(upgrade . #f) result))
>
> I fixed the indentation and the matching commentary and pushed as
> 86971616c139597ffa9e20acc75533ff90176450.

It is weird: I should miss something in my workflow because it is the
second time if not more that you fix the indentation.  Anyway!

Thank,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 30 Dec 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.