[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35588: [PATCH] ui: Search matches additional package outputs.
From: |
Ludovic Courtès |
Subject: |
bug#35588: [PATCH] ui: Search matches additional package outputs. |
Date: |
Mon, 06 May 2019 11:32:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Hello,
Chris Marusich <address@hidden> skribis:
> Tobias Geerinckx-Rice <address@hidden> 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’.
- bug#35588: guix package --search does not search output names, Chris Marusich, 2019/05/05
- bug#35588: [PATCH] ui: Search matches additional package outputs., Tobias Geerinckx-Rice, 2019/05/05
- bug#35588: [PATCH] ui: Search matches additional package outputs., Chris Marusich, 2019/05/06
- bug#35588: [PATCH] ui: Search matches additional package outputs.,
Ludovic Courtès <=
- bug#35588: [PATCH] ui: Search matches additional package outputs., Chris Marusich, 2019/05/06
- bug#35588: [PATCH] ui: Search matches additional package outputs., Ludovic Courtès, 2019/05/07
- bug#35588: [PATCH] ui: Search matches additional package outputs., bug#35588: [PATCH] ui: Search matches additional package outputs., Chris Marusich, 2019/05/08
- bug#35588: [PATCH] ui: Search matches additional package outputs., bug#35588: [PATCH] ui: Search matches additional package outputs., Ludovic Courtès, 2019/05/08
- bug#35588: [PATCH] ui: Search matches additional package outputs., Chris Marusich, 2019/05/09
- bug#35588: [PATCH] ui: Search matches additional package outputs., swedebugia, 2019/05/07