GNU bug report logs -
#70226
[PATCH] scripts: package: Disable searching with the empty string
Previous Next
Full log
View this message in rfc822 format
Hi!
Dale Mellor <guix-devel-0brg6a <at> rdmp.org> writes:
> Can you give a command-line use-case which actually triggers this bug?
Certainly. I've replicated this issue on guix a1ffa8a with:
$ guix search ""
$ guix system search ""
$ guix home search ""
guix search "" takes ~30 seconds before the bug occurs. (Once the first
result is printed to stdout.) system search and home search are
basically instant. That's probably due to the smaller pool of
candidates.
Working on this a bit more the problem isn't the regex search itself.
Instead, I'm confident it has to do with the highlighting performed by
display-search-results when passed a list containing a "" regex. The
issue does not occur for system search with just the following diff:
--8<---------------cut here---------------start------------->8---
modified guix/scripts/system/search.scm
@@ -189,5 +189,4 @@ (define (guix-system-search . args)
(leave-on-EPIPE
(display-search-results matches (current-output-port)
#:print service-type->recutils
- #:regexps regexps
#:command "guix system search")))))
--8<---------------cut here---------------end--------------->8---
V1 of this patch shouldn't be merged. The bug should be fixed in
display-search-results's highlighting logic instead.
--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
This bug report was last modified 1 year and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.