From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#35588: [PATCH] ui: Search matches additional package outputs. Date: Mon, 06 May 2019 11:32:12 +0200 Message-ID: <87muk0kjxf.fsf@gnu.org> References: <87r29czo6e.fsf@gmail.com> <20190505214153.32372-1-me@tobias.gr> <87bm0g6jbp.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:38129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNZza-0000UH-QN for bug-guix@gnu.org; Mon, 06 May 2019 05:33:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNZzZ-0005y8-Up for bug-guix@gnu.org; Mon, 06 May 2019 05:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42184) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNZzZ-0005y2-Rh for bug-guix@gnu.org; Mon, 06 May 2019 05:33:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNZzZ-0006Zc-Nq for bug-guix@gnu.org; Mon, 06 May 2019 05:33:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87bm0g6jbp.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> (Chris Marusich's message of "Mon, 06 May 2019 02:08:58 -0700") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Chris Marusich Cc: 35588@debbugs.gnu.org Hello, Chris Marusich skribis: > Tobias Geerinckx-Rice writes: > >> Here's a patch to match package outputs (except =E2=80=98out=E2=80=99, s= ince it can't affect the relative score) in =E2=80=98guix search=E2=80=99. > > 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=E2=80=99m 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 pack= ages. > + '("out" "debug" "doc" "static")))) > + (package-outputs package))) > + . 1) Could we have just this hunk or is there something I=E2=80=99m missing that would make it insufficient? Thank you, Ludo=E2=80=99.