diff mbox series

[bug#44931,1/1] upgrade: Allow several regexps.

Message ID 20201128203245.30190-1-zimon.toutoune@gmail.com
State Accepted
Headers show
Series upgrade: Allow several regexps (fix #44928). | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Simon Tournier Nov. 28, 2020, 8:32 p.m. UTC
Fixes <https://bugs.gnu.org/44928>.
Reported by Luis Felipe <luis.felipe.la@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(-)

Comments

Mathieu Othacehe Dec. 1, 2020, 10:36 a.m. UTC | #1
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
Simon Tournier Dec. 1, 2020, 12:42 p.m. UTC | #2
Hi Mathieu,

On Tue, 01 Dec 2020 at 11:36, Mathieu Othacehe <othacehe@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
diff mbox series

Patch

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@gnu.org>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune@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