GNU bug report logs - #35588
guix package --search does not search output names

Previous Next

Package: guix;

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


Message #14 received at 35588 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Chris Marusich <cmmarusich <at> gmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 35588 <at> debbugs.gnu.org
Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs.
Date: Mon, 06 May 2019 11:32:12 +0200
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.