* [bug#44931] [PATCH 0/1] upgrade: Allow several regexps (fix #44928).
@ 2020-11-28 20:26 zimoun
2020-11-28 20:32 ` [bug#44931] [PATCH 1/1] upgrade: Allow several regexps zimoun
0 siblings, 1 reply; 4+ messages in thread
From: zimoun @ 2020-11-28 20:26 UTC (permalink / raw)
To: 44931; +Cc: zimoun
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#44931] [PATCH 1/1] upgrade: Allow several regexps.
2020-11-28 20:26 [bug#44931] [PATCH 0/1] upgrade: Allow several regexps (fix #44928) zimoun
@ 2020-11-28 20:32 ` zimoun
2020-12-01 10:36 ` bug#44931: " Mathieu Othacehe
0 siblings, 1 reply; 4+ messages in thread
From: zimoun @ 2020-11-28 20:32 UTC (permalink / raw)
To: 44931; +Cc: zimoun
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(-)
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
--
2.29.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#44931: [PATCH 1/1] upgrade: Allow several regexps.
2020-11-28 20:32 ` [bug#44931] [PATCH 1/1] upgrade: Allow several regexps zimoun
@ 2020-12-01 10:36 ` Mathieu Othacehe
2020-12-01 12:42 ` [bug#44931] " zimoun
0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Othacehe @ 2020-12-01 10:36 UTC (permalink / raw)
To: zimoun; +Cc: 44931-done
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#44931] [PATCH 1/1] upgrade: Allow several regexps.
2020-12-01 10:36 ` bug#44931: " Mathieu Othacehe
@ 2020-12-01 12:42 ` zimoun
0 siblings, 0 replies; 4+ messages in thread
From: zimoun @ 2020-12-01 12:42 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 44931-done
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-01 12:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-28 20:26 [bug#44931] [PATCH 0/1] upgrade: Allow several regexps (fix #44928) zimoun
2020-11-28 20:32 ` [bug#44931] [PATCH 1/1] upgrade: Allow several regexps zimoun
2020-12-01 10:36 ` bug#44931: " Mathieu Othacehe
2020-12-01 12:42 ` [bug#44931] " zimoun
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.