Hello, Chris Marusich skribis: > Tobias Geerinckx-Rice 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’.