GNU bug report logs -
#35588
guix package --search does not search output names
Previous Next
Reported by: Chris Marusich <cmmarusich <at> gmail.com>
Date: Sun, 5 May 2019 19:40:01 UTC
Severity: normal
Tags: fixed
Done: Chris Marusich <cmmarusich <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello,
Chris Marusich <cmmarusich <at> gmail.com> skribis:
> Tobias Geerinckx-Rice <me <at> tobias.gr> writes:
>
>> Here's a patch to match package outputs (except ‘out’, since it can't affect the relative score) in ‘guix search’.
>
> Wow, thank you for the quick patch! Indeed, it works as advertised.
>
> That said, I see that your patch only omits the "out" output, and it
> also changes the way the regular expression matching works for all
> fields.
Yeah, how does this regexp/newline related to matching outputs, Tobias?
> What do you think of this solution? I think it's a little more drastic,
> but it feels cleaner to me. If I'm bike shedding, feel free to call me
> out on that! ;-)
FWIW I find it a bit too drastic. :-) It leads to much verbosity and
I’m not sure this is warranted.
> (define %package-metrics
> ;; Metrics used to compute the "relevance score" of a package against a set
> ;; of regexps.
> - `((,package-name . 4)
> -
> + `((,(lambda (package)
> + (list (package-name package)))
> + . 4)
> + ;; Match against uncommon outputs.
> + (,(lambda (package)
> + (filter (lambda (output)
> + (not (member output
> + ;; Some common outpus shared by many packages.
> + '("out" "debug" "doc" "static"))))
> + (package-outputs package)))
> + . 1)
Could we have just this hunk or is there something I’m missing that
would make it insufficient?
Thank you,
Ludo’.
This bug report was last modified 6 years and 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.