From unknown Sat Jun 21 10:22:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#35588 <35588@debbugs.gnu.org> To: bug#35588 <35588@debbugs.gnu.org> Subject: Status: guix package --search does not search output names Reply-To: bug#35588 <35588@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:22:18 +0000 retitle 35588 guix package --search does not search output names reassign 35588 guix submitter 35588 Chris Marusich severity 35588 normal tag 35588 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 15:39:34 2019 Received: (at submit) by debbugs.gnu.org; 5 May 2019 19:39:34 +0000 Received: from localhost ([127.0.0.1]:54929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNMyz-00035r-Fs for submit@debbugs.gnu.org; Sun, 05 May 2019 15:39:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNMyx-00035X-Hd for submit@debbugs.gnu.org; Sun, 05 May 2019 15:39:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:46014) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNMyq-0001z7-V9 for submit@debbugs.gnu.org; Sun, 05 May 2019 15:39:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNMyp-0004C1-K7 for bug-guix@gnu.org; Sun, 05 May 2019 15:39:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNMym-0001kw-NO for bug-guix@gnu.org; Sun, 05 May 2019 15:39:22 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:44445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNMyk-0001Td-VR for bug-guix@gnu.org; Sun, 05 May 2019 15:39:20 -0400 Received: by mail-pf1-x42b.google.com with SMTP id y13so5554608pfm.11 for ; Sun, 05 May 2019 12:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=RX881ueDjx59XSRDe1vFDEGxdJeZllcJzH03HNutC2c=; b=q+vOQoM967ExxoBZtHlKMghHZx1OqYFiPjo29Bs4o4OiXW91exJzwhoKzQhYL0X0sY WTOn6ieja7TNqGKsf2KNC2mZXQqqkfbwNLmGMwrAqRLILft0njQ3AedjYrnOQ8s0abN5 0UH7DP1elMsQbjfKFtwBIpJ6hZMdUhYhqJygm9i61Z/RVOrY4rgUX4lpJWRKGCW9aEe/ v+cQWTx+rcrccGUoACagIdEU8UAYlejkcx8xm9Eqnndt4W0o1E4hFjONcmj1WxhGBgU9 j+OGo5H4NF1ozIOKDgr615ybOgxxk30//Ilq7R4wgpX+lsa4iZLAdMFgxGVTEgUKkSer ar2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=RX881ueDjx59XSRDe1vFDEGxdJeZllcJzH03HNutC2c=; b=STerRC9WVwKUkLz3oTMGhNaSKyh76TbN7URFsAJwRp7m333QPIkqzAsSK0Zn0a7PLA rp2XwJmntxcGS64cdLfdo7YyaOzIlOrm8uoErMg+m05LrD2GGyqE84T/CuYQw/SxYhJy SxBY5WQxX6F+o/Cw2g767HgMo6OsSBWGjqw0wo7cUx2wd/L7cbdIvf5nqRVKe+X7XvxB C6kGcKB6XSn3zoSVd1WTNc6mZuYhMVelNluy/lcg8pQdjzYiwf1fcCav70qXo9wrnece CsjgmqgM3Ui/S2IRQCh6ao2Fp6aITaxQn7gRjEzJ14MZNEsMmMlpGFFyq3bqpp/qfL8D cRkw== X-Gm-Message-State: APjAAAWuh8vm3pTiMlzh5o72Xwh3P+row6xq3floZf0QBnclL1VGT/FG /IRTFpweKOTVh5BSPaqlDh/ylsU3 X-Google-Smtp-Source: APXvYqw1U1oYq0jGYrtU0qNlepONS7Pp3iAE+NT3NCu3n7nPeE5Zxbd+AV5BwzbqP5kN8RizHNqhiw== X-Received: by 2002:aa7:8384:: with SMTP id u4mr27556741pfm.214.1557085155459; Sun, 05 May 2019 12:39:15 -0700 (PDT) Received: from garuda.local ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id c8sm11186001pfr.16.2019.05.05.12.39.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 May 2019 12:39:14 -0700 (PDT) From: Chris Marusich To: bug-guix@gnu.org Subject: guix package --search does not search output names Date: Sun, 05 May 2019 12:39:05 -0700 Message-ID: <87r29czo6e.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42b X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, mikadoZero reported a bug here: https://lists.gnu.org/archive/html/help-guix/2019-04/msg00206.html The bug is reproducible. On Guix commit aa7cdc57dc28673dedfc6ec210974aaa0099a419, a search for keyword "cargo" does not find the "cargo" output of the "rust" package: =2D-8<---------------cut here---------------start------------->8--- $ guix package --search=3Dcargo name: chromium-bsu version: 0.9.16.1 outputs: out systems: x86_64-linux i686-linux armhf-linux aarch64-linux mips64el-linux dependencies: gettext-minimal@0.19.8.1 glu@9.0.0 pkg-config@0.29.2 + quesoglc@0.7.2 sdl-union@1.2.15 location: gnu/packages/games.scm:3295:2 homepage: http://chromium-bsu.sourceforge.net/ license: Clarified Artistic, Expat synopsis: Fast-paced, arcade-style, top-scrolling space shooter=20=20 description: In this game you are the captain of the cargo ship Chromium + B.S.U. and are responsible for delivering supplies to the troops on the = front + line. Your ship has a small fleet of robotic fighters which you control = from + the relative safety of the Chromium vessel. relevance: 2 =2D-8<---------------cut here---------------end--------------->8--- It should have printed all the "rust" packages, and the "mrustc" package, since each of them has a "cargo" output. Example: =2D-8<---------------cut here---------------start------------->8--- name: rust version: 1.34.0 outputs: out doc cargo systems: x86_64-linux i686-linux armhf-linux aarch64-linux mips64el-linux dependencies: bison@3.0.5 cmake@3.13.1 curl@7.63.0 flex@2.6.4 gdb@8.2.1 + jemalloc@5.1.0 libssh2@1.8.2 llvm@6.0.1 openssl@1.0.2p pkg-config@0.29.2 + procps@3.3.15 python2@2.7.15 rust@1.33.0 which@2.21 location: gnu/packages/rust.scm:1026:4 homepage: https://www.rust-lang.org license: ASL 2.0, Expat synopsis: Compiler for the Rust progamming language=20=20 description: Rust is a systems programming language that provides memory + safety and thread safety guarantees. =2D-8<---------------cut here---------------end--------------->8--- The general problem here is that Guix does not include outputs whose name matches the given regex. One might argue that we should simply add the output's name to a searchable field, like the description, in cases like this, but if it's easy to fix, we should just fix it. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlzPO9kACgkQ3UCaFdgi Rp1Hdg//bDcqZLlY1wzBNhWaQek/zM1m44KKllUgWW3sMAZ2YR7EO14bq+h9IlOS KIfDVb1WVnjV3T+vY7MVhuUqCrnonyRYlKnidP2rWFf3fpVB+9aA7FuI0s8V5AWM hFg9KOZvYGZx3ECMvfWqNutvnftbRMgjy0zIBePvY+1IWn8P3NGYxKAEMjYm+F1W Irieg+MABrRGShPbcI5L0GEsn8TvNhQE5o1V2LS9RKqvohAgL7FSe6co5SkaezKv xO9bULtFyI9HIgzKRezhwIW8Dslp2oF4BaExRl4E6ft5Wa+BKzFdWom17POSWbMS erpNA5pmZNOHphkndb0ydQOn4ykopD1V/w6p/4X62KNieFgS4JPjy8Vwwj8y4RH4 MQGdWwujU/9+SCHOy7m72F1WTqheA5uvReVwHHJhMlpxS9n+by+0mnxPyc+51Kya 8Tl2MgrX4STZqcR+N0sSya3RMVpTSPWqp2D0URlb0TfZmnU78dJuoYqMJ3+gNRuF nShog/90gYe5Tcx7oU8xqwEUOCBGI2W7FPoQFMPp5JHR12EdWJnm5kYd/vOODSDL Au4riebspMRi2qfxP/+3v37v7TtKRGOSzWRJBbLJFMmPSvHJZ3gr8iCdplepxiFr LbiNMOTnL9v72zlibkfCSkcignV6BRyaO2w6k/tI3Hq9TEybOoI= =vlAX -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 05 17:42:08 2019 Received: (at 35588) by debbugs.gnu.org; 5 May 2019 21:42:08 +0000 Received: from localhost ([127.0.0.1]:55067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNOtc-0006tC-Ct for submit@debbugs.gnu.org; Sun, 05 May 2019 17:42:08 -0400 Received: from tobias.gr ([80.241.217.52]:51060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNOta-0006t0-6r for 35588@debbugs.gnu.org; Sun, 05 May 2019 17:42:07 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id d3a334fc for <35588@debbugs.gnu.org>; Sun, 5 May 2019 21:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=2018; i=me@tobias.gr; bh=BQ2KSZ4xh ++p4DkQfUlxt7D2bNHuRN96KlsTR6ahD28=; b=Ag45Hz2RGgzzs7lxy+iENc35c 1o+fgQX3b/Q2PUP6cQt4v9e/RdLyn+pHW8qtmHqmMTZS65dsT2yJN6AOzCyOEfPG 81hftUUVQcFQQfBkU4t4LMpMCxkvjWw/U6CgPSDcFh2QfRcaodcIXgg4W1PTwXfK iNBpyV8HrHXufTc8uicQg1d/jyecKKQY+i7jhd9VGflqjt9JpzOaQRbWVlq0EhJZ KqiJ04T2LQuY5pK7nn9gebMGv3wqKeM7tQImrRedze7Uk6WeGnRjG2xdyrHQSIua D/rTZYuC2h8K/th0Ml5QFVz1EETjoedGhK2cg5mxSUUC1Sp+dpgX5qEVAQl9g== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id da015d1d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <35588@debbugs.gnu.org>; Sun, 5 May 2019 21:42:03 +0000 (UTC) From: Tobias Geerinckx-Rice To: 35588@debbugs.gnu.org Subject: [PATCH] ui: Search matches additional package outputs. Date: Sun, 5 May 2019 23:41:53 +0200 Message-Id: <20190505214153.32372-1-me@tobias.gr> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35588 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/ui.scm (%package-metrics): Add a PACKAGE-OUTPUTS metric with a relevance of 1. * guix/scripts/package.scm (process-query): Add the REGEXP/NEWLINE flag. --- mikadoZero, Guix, Here's a patch to match package outputs (except ‘out’, since it can't affect the relative score) in ‘guix search’. Before: ~ λ guix search ernel-patch # nothing After: ~ λ guix search ernel-patch name: wireguard version: 0.0.20190406 outputs: out kernel-patch … ~ λ guix search ^ernel-patch # nothing While the new REGEXP/NEWLINE flag affects how all fields are matched, I don't think it actually changes anything in practice without the second hunk. If there's a possibility that it might, I'd split this into two commits. Kind regards, T G-R guix/scripts/package.scm | 3 ++- guix/ui.scm | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index aa27984ea2..a31e78484e 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -751,7 +751,8 @@ processed, #f otherwise." (('query 'search rx) rx) (_ #f)) opts)) - (regexps (map (cut make-regexp* <> regexp/icase) patterns))) + (regexps (map (cut make-regexp* <> regexp/icase regexp/newline) + patterns))) (leave-on-EPIPE (let-values (((packages scores) (find-packages-by-description regexps))) diff --git a/guix/ui.scm b/guix/ui.scm index 92c845e944..f2466b605b 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1404,6 +1404,12 @@ score, the more relevant OBJ is to REGEXPS." ;; of regexps. `((,package-name . 4) + ;; Separate package outputs by newlines to match regexps like "^tools$". + ;; Hard-codedly ignore ‘out’ since it presumably exists for every package. + (,(lambda (package) + (string-join (delete "out" (package-outputs package)) + "\n")) . 1) + ;; Match regexps on the raw Texinfo since formatting it is quite expensive ;; and doesn't have much of an effect on search results. (,(lambda (package) -- 2.21.0 From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 05:09:17 2019 Received: (at 35588) by debbugs.gnu.org; 6 May 2019 09:09:17 +0000 Received: from localhost ([127.0.0.1]:55703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNZcW-0005um-If for submit@debbugs.gnu.org; Mon, 06 May 2019 05:09:17 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNZcU-0005uU-2V for 35588@debbugs.gnu.org; Mon, 06 May 2019 05:09:11 -0400 Received: by mail-pg1-f194.google.com with SMTP id h17so176691pgv.0 for <35588@debbugs.gnu.org>; Mon, 06 May 2019 02:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4Vz2hBrLu+yc0rCN7pTEDxadxNGB/ZBz6P50+9HAts4=; b=fxkxFHRPC6+BzWrIFames99uAKAEbDrS+Q32OBUWyMa75uv40cLLpeC/zZt3VCp/6K bUykfYjaxZm85JIJ5foHlNQXJj2iJJzDZTbV2u6juLHERcdu4QntBrJwz5KNCQwc7/q4 MTXYjEUks+C2rBzwXwxV1KqIgWXLirklxt9zeWSpZ/7rSrlsurlLzySIlTyr6I1D7hhO C6oJRtbTcJzGzfqtE8z9g8CQMy6CR4ZPx+wBekGEdzWJkVih7o5TE+MqN5L375cZpKso X1WfpfmHYT69/uEM2FDexklGQCJevtf2h/YK/CjjWottEXgPV2CnmdXmrFWDVzqosgxq tjtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4Vz2hBrLu+yc0rCN7pTEDxadxNGB/ZBz6P50+9HAts4=; b=W/bMtw/bUKMjHUk+fEwcJoupXV+kW62TFwsq8D+Ovhjtb0mf9qyq+c1+5Tk8gCqxlO bWWhNUEiogJrk1UFnzJhxn4lyQMfaL764SYCG9nIqI4Qo3TkmJkYKg0gCvsJTDSEDb6s iYIH+TlY3fEJUQSdBoc5qbDzgOskz1CbKl6QYeUhirA5TS52KXUCwyst2OnBEEW+wAUq sj1FIiuFq9AplSEDN8bdgJ9gDoNiQm0I/n7YBn5pGXNCXOfpxx+thR5AOKMUnrtwGmiv 2kNoOHco/d9ltVZegUUv3/O/gRBt4pYy4ksVGGgtaHXenn52ptLg7F71Mh4iStT9KmCr mwmA== X-Gm-Message-State: APjAAAUKGxvTzVLBFomei8pUlZcf1YV4J1TKiV5gCH016lNLPJUhUqes pxIwVbEFQwzXaOSe4YT5DuhSLeFAt74= X-Google-Smtp-Source: APXvYqzC8uJK8AQQQYBLeY3Su4/+SnqOuVkVv1bf0mEgRidm4EemPFJPianSIrqvBwMpmzSWQOk17Q== X-Received: by 2002:a63:6604:: with SMTP id a4mr31089125pgc.104.1557133743384; Mon, 06 May 2019 02:09:03 -0700 (PDT) Received: from garuda.local ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id q128sm13200353pfb.164.2019.05.06.02.09.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2019 02:09:02 -0700 (PDT) From: Chris Marusich X-Google-Original-From: Chris Marusich To: Tobias Geerinckx-Rice Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs. References: <87r29czo6e.fsf@gmail.com> <20190505214153.32372-1-me@tobias.gr> Date: Mon, 06 May 2019 02:08:58 -0700 In-Reply-To: <20190505214153.32372-1-me@tobias.gr> (Tobias Geerinckx-Rice's message of "Sun, 5 May 2019 23:41:53 +0200") Message-ID: <87bm0g6jbp.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 35588 Cc: 35588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Tobias! Tobias Geerinckx-Rice writes: > Here's a patch to match package outputs (except =E2=80=98out=E2=80=99, si= nce 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. Previously, a regex like "foo$" would have matched against "foo" at the end of a package's description string, but now it matches "foo" right before any newline in the description. In practice, it seems we have many newlines in the descriptions, since people wrap the lines in the source code with non-escaped newlines. I doubt anyone is relying on the use of $ or ^ to match at the start of end of the description, so this probably isn't a big deal, but it made me wonder how else we might be able to accomplish the same task without changing the way the regexes already work. I've attached a patch that attempts to do that. Basically, this patch is like yours in spirit, but it excludes a few more "common" outputs, and it splits the outputs into a list, rather than separating them by newlines in a single string. The downside is that I had to update all the other "metrics" procedures so they would always return a list. I kind of feel like returning the same type of object is an upside, not a downside, but I guess the pattern of returning #f for special cases is pretty common in Guile, so maybe my change isn't very idiomatic. 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! ;-) =2D-=20 Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-ui-Make-package-outputs-searchable.patch Content-Transfer-Encoding: quoted-printable From=2091d06d8950e700a8a3c3479c3613b579c53411c9 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Mon, 6 May 2019 01:51:30 -0700 Subject: [PATCH] ui: Make package outputs searchable. * guix/ui.scm (relevance): Expect the "field" procedure to always return a (possibly empty) list of strings, thereby eliminating the case in which (before this commit) "field" might return #f. Add up the score of each string in the list, and use that as the overall score when folding over the metrics. Update docstring. (%package-metrics): Return a list in every case. * guix/scripts/system/search.scm (process-query) <%service-type-metrics>: Return a list in every case. * guix/scripts/package.scm (find-packages-by-description): Update docstring. =2D-- guix/scripts/package.scm | 6 ++--- guix/scripts/system/search.scm | 17 +++++++++++---- guix/ui.scm | 40 ++++++++++++++++++++++++---------- 3 files changed, 44 insertions(+), 19 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index aa27984ea2..06e4cf5b9c 100644 =2D-- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -180,9 +180,9 @@ hooks\" run when building the profile." ;;; =20 (define (find-packages-by-description regexps) =2D "Return two values: the list of packages whose name, synopsis, or =2Ddescription matches at least one of REGEXPS sorted by relevance, and the= list =2Dof relevance scores." + "Return two values: the list of packages whose name, synopsis, descripti= on, +or output matches at least one of REGEXPS sorted by relevance, and the lis= t of +relevance scores." (let ((matches (fold-packages (lambda (package result) (if (package-superseded package) result diff --git a/guix/scripts/system/search.scm b/guix/scripts/system/search.scm index 955cdd1e95..733fa22614 100644 =2D-- a/guix/scripts/system/search.scm +++ b/guix/scripts/system/search.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017, 2018 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2018 Cl=C3=A9ment Lassieur +;;; Copyright =C2=A9 2019 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -128,14 +129,22 @@ columns." =20 (define %service-type-metrics ;; Metrics used to estimate the relevance of a search result. =2D `((,service-type-name* . 3) =2D (,service-type-description-string . 2) + `((,(lambda (type) + (match (service-type-name* type) + (#f '()) + (name (list name)))) + . 3) + (,(lambda (type) + (match (service-type-description-string type) + (#f '()) + (description (list description)))) + . 2) (,(lambda (type) (match (and=3D> (service-type-location type) location-file) ((? string? file) =2D (basename file ".scm")) + (list (basename file ".scm"))) (#f =2D ""))) + '()))) . 1))) =20 (define (find-service-types regexps) diff --git a/guix/ui.scm b/guix/ui.scm index 92c845e944..9121e3daee 100644 =2D-- a/guix/ui.scm +++ b/guix/ui.scm @@ -11,6 +11,7 @@ ;;; Copyright =C2=A9 2016 Benz Schenk ;;; Copyright =C2=A9 2018 Kyle Meyer ;;; Copyright =C2=A9 2018 Ricardo Wurmus +;;; Copyright =C2=A9 2019 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -1370,7 +1371,7 @@ WIDTH columns. EXTRA-FIELDS is a list of symbol/valu= e pairs to emit." (define (relevance obj regexps metrics) "Compute a \"relevance score\" for OBJ as a function of its number of matches of REGEXPS and accordingly to METRICS. METRICS is list of =2Dfield/weight pairs, where FIELD is a procedure that returns a string +field/weight pairs, where FIELD is a procedure that returns a list of stri= ngs describing OBJ, and WEIGHT is a positive integer denoting the weight of th= is field in the final score. =20 @@ -1392,29 +1393,44 @@ score, the more relevant OBJ is to REGEXPS." (fold (lambda (metric relevance) (match metric ((field . weight) =2D (match (field obj) =2D (#f relevance) =2D (str (+ relevance =2D (* (score str) weight))))))) + (let ((strings (field obj))) + (+ relevance + (* weight + ;; Evaluates to 0 when strings is the empty list. + (apply + (map score strings)))))))) 0 metrics)) =20 (define %package-metrics ;; Metrics used to compute the "relevance score" of a package against a = set ;; of regexps. =2D `((,package-name . 4) =2D + `((,(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 packag= es. + '("out" "debug" "doc" "static")))) + (package-outputs package))) + . 1) ;; Match regexps on the raw Texinfo since formatting it is quite expen= sive ;; and doesn't have much of an effect on search results. (,(lambda (package) =2D (and=3D> (package-synopsis package) P_)) . 3) + (match (and=3D> (package-synopsis package) P_) + (#f '()) + (synopsis (list synopsis)))) + . 3) (,(lambda (package) =2D (and=3D> (package-description package) P_)) . 2) =2D + (match (and=3D> (package-description package) P_) + (#f '()) + (description (list description)))) + . 2) (,(lambda (type) (match (and=3D> (package-location type) location-file) =2D ((? string? file) (basename file ".scm")) =2D (#f ""))) + ((? string? file) (list (basename file ".scm"))) + (#f '()))) . 1))) =20 (define (package-relevance package regexps) =2D-=20 2.20.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlzP+aoACgkQ3UCaFdgi Rp2vHBAAt0ZFgM8T0NjBBlgrBuuYMH3Rx6Nk5fQt/9qzNQNMo0t2BeRFwHjZLmST /bKFpQi8H3/u/wRVr0bKcwM8P5Iu9C+swX6AJckt0h1XO85J/EOI4THCjCIAIx+/ vWMTNfaUhT1XEp3VLU/IpbyNyM7ZEEXL5PoE1UD0ZkL2ODuXHK1x4qO9lOApFvTq FRqveKBez1Qbj+jpWGRqGKbH4x0APg8Cm9M+jlGuzgw89lu0D44h0OB0A+s0GbMi 4OOZCug9eYKdeMQkpj4gv7HFjSSirrsCJnDOv+uK3y65oYUxfhV+nmSKIxshotr5 kElJn1UlJt7Eq0crqZ56Q1cnARNQKzOLiNleKZuzKSZf0n/3fsSTBvzEtajJmSqr vUSPB1ySWlLjva98azP0M8HxDE/X4xNyqgUlC9iKPZsi+nq+lFMbbzj1ljE4Upy9 c6ZaDL2hM71OqY3GUQYimeksaaKRdXexuO/LttV98L1zAiI494ZNoJ9hG7KHByd3 eJVhEtpGar8PynjapQhQPXqPwziEiqF/kcIUJ199BG44B11Sq3/8hDjcvcOiUEC8 D12vmC1BEvdIM3b/LJPFVQMSV/cxo47IXM3wGAwN3hp7CxWN1kyFZPY9LN7FdiQv WxaeOSmZGn9HN4AYSmLaSaF79+L5EYSjS4gAG14wdO0gYU+sMR4= =PVgI -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 05:32:22 2019 Received: (at 35588) by debbugs.gnu.org; 6 May 2019 09:32:22 +0000 Received: from localhost ([127.0.0.1]:55728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNZyw-0006Yg-Iw for submit@debbugs.gnu.org; Mon, 06 May 2019 05:32:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNZyu-0006YT-RW for 35588@debbugs.gnu.org; Mon, 06 May 2019 05:32:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNZyo-0005W7-H6; Mon, 06 May 2019 05:32:14 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=48002 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hNZyo-0004Pf-0j; Mon, 06 May 2019 05:32:14 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Chris Marusich Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs. 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> Date: Mon, 06 May 2019 11:32:12 +0200 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") Message-ID: <87muk0kjxf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35588 Cc: Tobias Geerinckx-Rice , 35588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Mon May 06 20:58:03 2019 Received: (at 35588) by debbugs.gnu.org; 7 May 2019 00:58:03 +0000 Received: from localhost ([127.0.0.1]:57839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNoQh-0003fc-BA for submit@debbugs.gnu.org; Mon, 06 May 2019 20:58:03 -0400 Received: from mail-pf1-f172.google.com ([209.85.210.172]:36984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNoQf-0003fO-6M for 35588@debbugs.gnu.org; Mon, 06 May 2019 20:57:57 -0400 Received: by mail-pf1-f172.google.com with SMTP id g3so7674934pfi.4 for <35588@debbugs.gnu.org>; Mon, 06 May 2019 17:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MfxQgd9uyT17TTQ7dc8uGd8PYH4iZ9wCxYChxc0dnTM=; b=SpBWPnpvMj4/eQZmn3nudO7f6aBVP81U+rjZymISLjJpD+DCQW86s4rueN9dcPEvNe EEbRR1Zk8qwTSBtzf/vgUri+JxzjA73Cxo9JA+J+Nuh3C/2flxT/0iERH4RGDtpLS5JI /vQgNFLykU3ns3WuC1bdeHOtCTQloHAe3S7OlGVUfR9IxDFQMv7+sw98SdJVC/sPYI5g N7Ez+vQ+Pyx/x/AezKoOV2QCQBgBxeLUhrhggB3RXxSzu7yvlGBfZHB94g1Sjh5r/HUt EYM/+hBrVUDQaPtu3JGcmGYSR1PWAJE4ACi/d0PGntcbNdlomgdr5G5mlRjCbdZj7wUr DL+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MfxQgd9uyT17TTQ7dc8uGd8PYH4iZ9wCxYChxc0dnTM=; b=AEKJjy+ykGuEEihRRF9x594V/1k/wxSIHBeYelzLrJ3jjRhq824qPwO9ztDsIpm9CN XYZfm84RuiEDf3rhJz5bSB1Gcn/A2wb9s28FnlXnqCBwtUfNayJ7Eo/VFe12zKcFDjgD zEWvO7lig62hI7dar/srHYm0eG+v2wVogs2Gl+YkUHV3UwkZCAvnqjumoIgp+ASanzR4 aQkOCFV/rx6M76d+dzkyMJ5Y28Z3MU+qRP9x/T0reO8k9REd5hmGO8+SNvDN/Z4eAddd Gjix3CTOARGY5otgoXcpIAzGN0EG5EolzqcIbJnoehTV041W7cK4m4Ws1d5qtxaCj6cx +9cQ== X-Gm-Message-State: APjAAAWtwMc6qbl4Gb9FOluieiD/Qr9WNPQ1QQ9Mem0hK4f1UBdn+rIV XD14ObdsqhVTt0/tJ5QGLOz3UMFnHy+FPw== X-Google-Smtp-Source: APXvYqwX/BVoUSBtCkPTDYssNazABELtpBOd0lqMWXVCd8YKvDLuKtDW7iN1iLKqEkpF5hg/PRbsTA== X-Received: by 2002:a63:d615:: with SMTP id q21mr16744859pgg.401.1557190670672; Mon, 06 May 2019 17:57:50 -0700 (PDT) Received: from garuda.local ([2607:fb90:a68d:69e7:ff1b:a9ae:3578:4368]) by smtp.gmail.com with ESMTPSA id x6sm14238481pfm.114.2019.05.06.17.57.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2019 17:57:49 -0700 (PDT) From: Chris Marusich To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs. 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> <87muk0kjxf.fsf@gnu.org> Date: Mon, 06 May 2019 17:57:46 -0700 In-Reply-To: <87muk0kjxf.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 06 May 2019 11:32:12 +0200") Message-ID: <87zhnzxer9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35588 Cc: Tobias Geerinckx-Rice , 35588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Could we have just this hunk or is there something I=E2=80=99m missing th= at > would make it insufficient? That hunk alone is not enough, but I think the attached patch would do the trick. We just need to allow for the new possibility that the "field" procedure returns a list of strings. What do you think? =2D-=20 Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-ui-Make-package-outputs-searchable.patch Content-Transfer-Encoding: quoted-printable From=20c1150a217a416ef4ceccf87c56e36e8e921f873a Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Mon, 6 May 2019 01:51:30 -0700 Subject: [PATCH] ui: Make package outputs searchable. * guix/ui.scm (relevance): Allow the "field" procedure of a metric to return a list, and handle that case appropriately. Update docstring. (%package-metrics): Add a metric for package outputs. * guix/scripts/package.scm (find-packages-by-description): Update docstring. Co-authored-by: Tobias Geerinckx-Rice =2D-- guix/scripts/package.scm | 6 +++--- guix/ui.scm | 24 +++++++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index aa27984ea2..06e4cf5b9c 100644 =2D-- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -180,9 +180,9 @@ hooks\" run when building the profile." ;;; =20 (define (find-packages-by-description regexps) =2D "Return two values: the list of packages whose name, synopsis, or =2Ddescription matches at least one of REGEXPS sorted by relevance, and the= list =2Dof relevance scores." + "Return two values: the list of packages whose name, synopsis, descripti= on, +or output matches at least one of REGEXPS sorted by relevance, and the lis= t of +relevance scores." (let ((matches (fold-packages (lambda (package result) (if (package-superseded package) result diff --git a/guix/ui.scm b/guix/ui.scm index 92c845e944..b7ccd8312a 100644 =2D-- a/guix/ui.scm +++ b/guix/ui.scm @@ -11,6 +11,8 @@ ;;; Copyright =C2=A9 2016 Benz Schenk ;;; Copyright =C2=A9 2018 Kyle Meyer ;;; Copyright =C2=A9 2018 Ricardo Wurmus +;;; Copyright =C2=A9 2019 Chris Marusich +;;; Copyright =C2=A9 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -1370,9 +1372,9 @@ WIDTH columns. EXTRA-FIELDS is a list of symbol/valu= e pairs to emit." (define (relevance obj regexps metrics) "Compute a \"relevance score\" for OBJ as a function of its number of matches of REGEXPS and accordingly to METRICS. METRICS is list of =2Dfield/weight pairs, where FIELD is a procedure that returns a string =2Ddescribing OBJ, and WEIGHT is a positive integer denoting the weight of = this =2Dfield in the final score. +field/weight pairs, where FIELD is a procedure that returns a string or li= st +of strings describing OBJ, and WEIGHT is a positive integer denoting the +weight of this field in the final score. =20 A score of zero means that OBJ does not match any of REGEXPS. The higher = the score, the more relevant OBJ is to REGEXPS." @@ -1394,8 +1396,11 @@ score, the more relevant OBJ is to REGEXPS." ((field . weight) (match (field obj) (#f relevance) =2D (str (+ relevance =2D (* (score str) weight))))))) + ((? string? str) (+ relevance + (* (score str) weight))) + ((? list? lst) (+ relevance + (* weight + (apply + (map score lst))))))))) 0 metrics)) =20 @@ -1404,6 +1409,15 @@ score, the more relevant OBJ is to REGEXPS." ;; of regexps. `((,package-name . 4) =20 + ;; Match against uncommon outputs. + (,(lambda (package) + (filter (lambda (output) + (not (member output + ;; Some common outpus shared by many packag= es. + '("out" "debug" "doc" "static")))) + (package-outputs package))) + . 1) + ;; Match regexps on the raw Texinfo since formatting it is quite expen= sive ;; and doesn't have much of an effect on search results. (,(lambda (package) =2D-=20 2.20.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlzQ2AoACgkQ3UCaFdgi Rp1pqxAAlaBwzbBdkq1QL3T+eJusUlwMF3PV/2SPXlnGxO90Hl5Vlpcxx5v1CN2S ZCwQR5twjWhG6LuwuTCpaJ8XDUcseJIXY335Sq2TCRTbkYxugFltWGONpXBTERIm KlpGW2cRUsO+NWgi3Hdy/oC5PcY7kS/z2S74002M9Z0qcx4LuiKIG06hIsi2yMxn j3tBKcqk+DSr3PjG/HghSvb1W9Bisltq0S7NKOOWL1o1TFVGnsRScRFsCQVNn8Cp jwpc10TSVW02xdfIJwJcmQxE4nI4GtMTBGPzn5Bg/myuOlhgRk6N+YIannQ8EHhx G1otQDSoCoLsEiuX+a0SUaEKQ4LpNO0HjbgucsFDqJhbcTHLYZtx22AbvR6ckpiK F82mU8Oh2fBGLLnh1siNI7WXoFp/iGN2oFHcRqgLVqFRScvz9kDS/HKtnS+eQsbU fLBCFJ6YkaLJ2XqXVdOr6CrwC4UGEW52EBIPn361VAB5/4HKZQw71LFxICDDkyrB P5PJuTUS30SwnU+IG3Pm1xHA/PiWYE/EKc2ipZOPLLE7cT4iG3x1IMhvvmHFGawC /HhzMTjmwLw3Qn7kvhphKUAOWfNv5ZV1l8BtIqRBqK9mh1Kl6OLUkai8kSLjfF5/ xQgeI9A8WRRP4D0VK+oy9LnESG6i5yOJpP+mVEuTHXVTHg5YpZU= =0Ax+ -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 07 04:25:50 2019 Received: (at 35588) by debbugs.gnu.org; 7 May 2019 08:25:50 +0000 Received: from localhost ([127.0.0.1]:58176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNvQ6-0001ji-J6 for submit@debbugs.gnu.org; Tue, 07 May 2019 04:25:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNvQ4-0001jQ-8d for 35588@debbugs.gnu.org; Tue, 07 May 2019 04:25:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvPy-0003d6-Tz; Tue, 07 May 2019 04:25:42 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=38516 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hNvPw-0000X0-FF; Tue, 07 May 2019 04:25:42 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Chris Marusich Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs. 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> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 07 May 2019 10:25:39 +0200 In-Reply-To: <87zhnzxer9.fsf@gmail.com> (Chris Marusich's message of "Mon, 06 May 2019 17:57:46 -0700") Message-ID: <87mujy8yd8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35588 Cc: Tobias Geerinckx-Rice , 35588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Chris Marusich skribis: > From c1150a217a416ef4ceccf87c56e36e8e921f873a Mon Sep 17 00:00:00 2001 > From: Chris Marusich > Date: Mon, 6 May 2019 01:51:30 -0700 > Subject: [PATCH] ui: Make package outputs searchable. > > * guix/ui.scm (relevance): Allow the "field" procedure of a metric to > return a list, and handle that case appropriately. Update docstring. > (%package-metrics): Add a metric for package outputs. > * guix/scripts/package.scm (find-packages-by-description): Update > docstring. > > Co-authored-by: Tobias Geerinckx-Rice [...] > (match (field obj) > (#f relevance) > - (str (+ relevance > - (* (score str) weight))))))) > + ((? string? str) (+ relevance > + (* (score str) weight))) > + ((? list? lst) (+ relevance > + (* weight > + (apply + (map score lst))))))))) Nitpick: it=E2=80=99s a bit subjective, but I think this clause might be slightly nicer like this: ((lst ...) (+ relevance (* weight (reduce + 0 (map score lst))))) Anyway, LGTM! Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 07 18:24:49 2019 Received: (at 35588) by debbugs.gnu.org; 7 May 2019 22:24:49 +0000 Received: from localhost ([127.0.0.1]:59898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hO8W1-0006Px-Dg for submit@debbugs.gnu.org; Tue, 07 May 2019 18:24:49 -0400 Received: from mx1.riseup.net ([198.252.153.129]:49786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hO8Vz-0006Po-0F for 35588@debbugs.gnu.org; Tue, 07 May 2019 18:24:47 -0400 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id B0A2A1A3C51 for <35588@debbugs.gnu.org>; Tue, 7 May 2019 15:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1557267885; bh=eS3evlX0NWrnFYlrLiWUaHoyMJJcQZ3quESapTqoIeU=; h=Subject:Cc:References:From:Date:In-Reply-To:From; b=WfhnafK51RceVUGp3s3aqY5EOtTz48iP4VykZW0G6j7kciJgkLvTcQeyaq1U/g4yg 8q1O3w6nFcYnOvj35LT9nMFR5U/aW/jTYo2za0aQ9slGJZLmxSbFqbuYs4+fnREAtL N5qrcLs+btuT/jkT3fw0SvEe+e4tpmbWxoo2OGAI= X-Riseup-User-ID: 58EC8663D9DB77EA466EF18D7E8F1F11A3E47D90806B9F96CE6DD2299A9828BE Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 938BD120BC7 for <35588@debbugs.gnu.org>; Tue, 7 May 2019 15:24:44 -0700 (PDT) Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs. 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> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> From: swedebugia Message-ID: <7951ec53-8eee-04a3-9be4-7501d46eceb8@riseup.net> Date: Wed, 8 May 2019 00:24:39 +0200 MIME-Version: 1.0 In-Reply-To: <87zhnzxer9.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 35588 Cc: 35588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 2019-05-07 02:57, Chris Marusich wrote: > + ;; Match against uncommon outputs. > + (,(lambda (package) > + (filter (lambda (output) > + (not (member output > + ;; Some common outpus shared by many packages. > + '("out" "debug" "doc" "static")))) I suggest we add "gui" and "lib" to this list. -- Cheers Swedebugia From debbugs-submit-bounces@debbugs.gnu.org Wed May 08 02:50:48 2019 Received: (at 35588) by debbugs.gnu.org; 8 May 2019 06:50:49 +0000 Received: from localhost ([127.0.0.1]:60217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOGPa-0004lI-Ji for submit@debbugs.gnu.org; Wed, 08 May 2019 02:50:48 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOGPX-0004l4-I7 for 35588@debbugs.gnu.org; Wed, 08 May 2019 02:50:41 -0400 Received: by mail-pf1-f195.google.com with SMTP id z28so10005452pfk.0 for <35588@debbugs.gnu.org>; Tue, 07 May 2019 23:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=yDl2ro6VV1jYK8GT+m5PDLB3JtuazvzUqNAKEZDbKUo=; b=F4AjYALSo2PQqYcDKJ6YzNmwL67xoDFF90HV+980dzbyIk4l03mvUAaz+6xbnvnE2q tonbrD+3m6DBo93Ma9fIMWxIlMpeMmWK8lrnVq8areKnjLiJiA5EfmdXyioPxmjS4EYu t2UGupXQ5AWTciNW60GaBKX+5eREmPCPRwzaq4eNhrXSulxRFWsOZHQvW2XOJ3jrq33v YDJn324HtewJZ5EKguXV2soh8LOLB73jX9BWB3mY7GYGYJMvlQ2nZenRAsb/lq3jBQM6 MezUpg+MY/PvrfF+zTKTr/zGmCxcbkjJsP+rPKvzwluCUg0pTDYwa4QRpxD7ZX9s4FQL FlAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=yDl2ro6VV1jYK8GT+m5PDLB3JtuazvzUqNAKEZDbKUo=; b=qEn2FJPT7on0wgMtX54eM/A4GNVpbI3u8o/rQCrTyUqMD0lEBZyFh2Vmof92VRVocW AoTePHYOzCQQF+I/vuJqhX5vMGQljjdjgW3/j7I0sAS1UF+bj8u7wbpzsLwL1Jk9becL EXz3Yke3xfx7LJBQpCDhcaEC1fHy8MaLy6ETI9JNAdL9KsCBSA+ErYqfDC0F+sPAZp15 Recyonigs50IoAuf05v1tdMRUb+BSWCODHCs3whbpuIuejVsIqmQh+DbAy/HgDJEZCAj MeLH+bYHXgU2uUdpQg1/wc/mm1Ntew2bSHFE50GNiu1/vf1OEuUgf1Mp4CfdI5/zewbm sSaA== X-Gm-Message-State: APjAAAUauOKmZd3BwGx3rHl/0zUxuzLjTyYskYQIcemTrUOYjF+A0EgL KHK0BLSn91XuNoE/qU+j3ggQaEzx X-Google-Smtp-Source: APXvYqxLoQ1Q5wdLER0k8bs6YRtzQvIS+r9/HMk3/jj3yUO2nNEW4qs7ewt70fpWzlV7iXfBrStvAw== X-Received: by 2002:a65:578b:: with SMTP id b11mr23296953pgr.446.1557298232039; Tue, 07 May 2019 23:50:32 -0700 (PDT) Received: from garuda.local ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id b32sm4715881pgm.87.2019.05.07.23.50.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2019 23:50:30 -0700 (PDT) From: Chris Marusich To: Ludovic =?utf-8?Q?Court=C3=A8s?= , swedebugia Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs., bug#35588: [PATCH] ui: Search matches additional package outputs. 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> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> <87r29czo6e.fsf@gmail.com> <20190505214153.32372-1-me@tobias.gr> <87bm0g6jbp.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> <87mujy8yd8.fsf@gnu.org> Date: Tue, 07 May 2019 23:50:29 -0700 In-Reply-To: <87mujy8yd8.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 07 May 2019 10:25:39 +0200, Wed, 8 May 2019 00:24:39 +0200") Message-ID: <878svhv3re.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35588 Cc: Tobias Geerinckx-Rice , 35588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: >> (match (field obj) >> (#f relevance) >> - (str (+ relevance >> - (* (score str) weight))))))) >> + ((? string? str) (+ relevance >> + (* (score str) weight))) >> + ((? list? lst) (+ relevance >> + (* weight >> + (apply + (map score lst))))))))) > > Nitpick: it=E2=80=99s a bit subjective, but I think this clause might be > slightly nicer like this: > > ((lst ...) > (+ relevance (* weight (reduce + 0 (map score lst))))) Works for me! I've changed the match clause accordingly in the attached patch. swedebugia writes: > On 2019-05-07 02:57, Chris Marusich wrote: >> + ;; Match against uncommon outputs. >> + (,(lambda (package) >> + (filter (lambda (output) >> + (not (member output >> + ;; Some common outpus shared by many pac= kages. >> + '("out" "debug" "doc" "static")))) > > I suggest we add "gui" and "lib" to this list. Actually, I was curious about this, so I checked how many outputs are being used by all our packages today. Here are the results: =2D-8<---------------cut here---------------start------------->8--- scheme@(guix-user)> ,use (gnu packages) (guix packages) scheme@(guix-user)> (define (increment table key) (hash-set! table key (+ 1= (hash-ref table key 0)))) scheme@(guix-user)> (define (increment-outputs package table) (for-each (la= mbda (output) (increment table output)) (package-outputs package)) table) scheme@(guix-user)> (define outputs-to-count (fold-packages increment-outpu= ts (make-hash-table))) scheme@(guix-user)> ,pp (sort (hash-map->list cons outputs-to-count) (lambd= a (a b) (< (cdr a) (cdr b)))) $1 =3D (("kernel-patch" . 1) ("pcf-8bit" . 1) ("python2" . 1) ("schema" . 1) ("octave" . 1) ("jp" . 1) ("db" . 1) ("gtk3" . 1) ("kr" . 1) ("subtree" . 1) ("pulseaudio" . 1) ("cn" . 1) ("ruby" . 1) ("fbgrab" . 1) ("credential-netrc" . 1) ("front-end" . 1) ("psf" . 1) ("tw" . 1) ("libedataserverui" . 1) ("gtk2" . 1) ("pcf" . 1) ("send-email" . 1) ("jack" . 1) ("python3" . 1) ("ndiff" . 1) ("installer" . 1) ("svn" . 1) ("image" . 1) ("tiles" . 2) ("fortran" . 3) ("include" . 3) ("utils" . 3) ("tests" . 3) ("python" . 4) ("tk" . 4) ("metis" . 4) ("gui" . 4) ("examples" . 5) ("jdk" . 6) ("bin" . 8) ("cargo" . 16) ("static" . 33) ("lib" . 38) ("debug" . 87) ("doc" . 134) ("out" . 9811)) scheme@(guix-user)>=20 =2D-8<---------------cut here---------------end--------------->8--- In light of that, I've chosen to exclude all of the following outputs: '("out" "doc" "debug" "lib" "static" "bin" "examples" "gui" "tests" "utils" "include") I've also added a test to verify that package outputs are included in search results. What do you all think of this latest version? =2D-=20 Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-ui-Make-package-outputs-searchable.patch Content-Transfer-Encoding: quoted-printable From=20dedea618bdd0d557e3e1183c403ff4e11d1757f8 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Mon, 6 May 2019 01:51:30 -0700 Subject: [PATCH] ui: Make package outputs searchable. * guix/ui.scm (relevance): Allow the "field" procedure of a metric to return a list, and handle that case appropriately. Update docstring. (%package-metrics): Add a metric for package outputs. * guix/scripts/package.scm (find-packages-by-description): Update docstring. * tests/guix-package.sh: Add a test case to verify that package outputs are included in search results. Co-authored-by: Tobias Geerinckx-Rice =2D-- guix/scripts/package.scm | 6 +++--- guix/ui.scm | 25 ++++++++++++++++++++----- tests/guix-package.sh | 25 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index aa27984ea2..06e4cf5b9c 100644 =2D-- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -180,9 +180,9 @@ hooks\" run when building the profile." ;;; =20 (define (find-packages-by-description regexps) =2D "Return two values: the list of packages whose name, synopsis, or =2Ddescription matches at least one of REGEXPS sorted by relevance, and the= list =2Dof relevance scores." + "Return two values: the list of packages whose name, synopsis, descripti= on, +or output matches at least one of REGEXPS sorted by relevance, and the lis= t of +relevance scores." (let ((matches (fold-packages (lambda (package result) (if (package-superseded package) result diff --git a/guix/ui.scm b/guix/ui.scm index 92c845e944..8f95c00361 100644 =2D-- a/guix/ui.scm +++ b/guix/ui.scm @@ -11,6 +11,8 @@ ;;; Copyright =C2=A9 2016 Benz Schenk ;;; Copyright =C2=A9 2018 Kyle Meyer ;;; Copyright =C2=A9 2018 Ricardo Wurmus +;;; Copyright =C2=A9 2019 Chris Marusich +;;; Copyright =C2=A9 2019 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -1370,9 +1372,9 @@ WIDTH columns. EXTRA-FIELDS is a list of symbol/valu= e pairs to emit." (define (relevance obj regexps metrics) "Compute a \"relevance score\" for OBJ as a function of its number of matches of REGEXPS and accordingly to METRICS. METRICS is list of =2Dfield/weight pairs, where FIELD is a procedure that returns a string =2Ddescribing OBJ, and WEIGHT is a positive integer denoting the weight of = this =2Dfield in the final score. +field/weight pairs, where FIELD is a procedure that returns a string or li= st +of strings describing OBJ, and WEIGHT is a positive integer denoting the +weight of this field in the final score. =20 A score of zero means that OBJ does not match any of REGEXPS. The higher = the score, the more relevant OBJ is to REGEXPS." @@ -1394,8 +1396,10 @@ score, the more relevant OBJ is to REGEXPS." ((field . weight) (match (field obj) (#f relevance) =2D (str (+ relevance =2D (* (score str) weight))))))) + ((? string? str) + (+ relevance (* (score str) weight))) + ((lst ...) + (+ relevance (* weight (apply + (map score lst))))))))) 0 metrics)) =20 @@ -1404,6 +1408,17 @@ score, the more relevant OBJ is to REGEXPS." ;; of regexps. `((,package-name . 4) =20 + ;; Match against uncommon outputs. + (,(lambda (package) + (filter (lambda (output) + (not (member output + ;; Some common outpus shared by many packag= es. + '("out" "doc" "debug" "lib" "static" "bin" + "examples" "gui" "tests" "utils" + "include")))) + (package-outputs package))) + . 1) + ;; Match regexps on the raw Texinfo since formatting it is quite expen= sive ;; and doesn't have much of an effect on search results. (,(lambda (package) diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 0d60481895..262d29bd59 100644 =2D-- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -398,3 +398,28 @@ else grep "manifest.scm:[1-3]:.*wonderful-package.*: unbound variable" \ "$module_dir/stderr" fi + +# Verify that package outputs are included in search results. +rm -rf "$module_dir" +mkdir "$module_dir" +cat > "$module_dir/foo.scm"< /tmp/out +test "`guix package -L "$module_dir" -s dummy-output | grep ^name:`" =3D "= name: dummy-package" +rm -rf "$module_dir" =2D-=20 2.20.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlzSfDUACgkQ3UCaFdgi Rp1xwg/+NTUP1dIArj6abV7Sdr+sKDaOPxKDxPcMjSeHvgYDoPtA9LKyEcJdwqnN SPcEgHsUMLdjiKSlkzrOlP+TFIPpLOI6Ttl8g7DSzk8nunUbzo4/GtnrACQB0+PM x+rr20a2PNqtZslmqicIJ8S3i63v+8b7K9+4CUuN/uQzNenufk5+XW2Fk6T0G4/e 1EKEiayOSDy/yZ4R177X1wlr+MPrwc7+M7OfavTAf0VPJ6EBUpAO1PltuJGSR9oY LVTcIUOligLrcguYE6Ftc5wCwC7tV7V81cQj8FwudR/EIB3qGU2NZQi1866SiPoq +poynWV7ZB03BD6ttossmyM3ZTrF2PzrGTADajHCwHalZf6Sc49ZHV5JXXyEcYKL Y0h+tdMInF4JhMm+5b3lbDPQ1zCyukABiEdg2RGzH3SL8HRfzDbPfMKq4f9YrMxw WfcmC3abU8d7upU0mtYXTTOWRoRLwV01lDHYq0wJGfotudcoaZUCX30iSl1/4dOT 8EQSSNhudqr3uqYcEWoo8cqY6e3if+JxMwaNkngsb5bEyg2ed3eykjBNA3wvNnk4 FihDjqpvT4JQOry/c8Wg+sUR6pgaKhanhQQT+1PCSuMYbGUi7ImBRrN/g/NdEA+Q TwDrLV8++2gRwqX8A65RycsADgrVC+d3PhSwT8g4wSDQejmLTFQ= =imKk -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 08 06:39:55 2019 Received: (at 35588) by debbugs.gnu.org; 8 May 2019 10:39:55 +0000 Received: from localhost ([127.0.0.1]:60397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOJzP-00024N-En for submit@debbugs.gnu.org; Wed, 08 May 2019 06:39:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOJzN-00024A-Ra for 35588@debbugs.gnu.org; Wed, 08 May 2019 06:39:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOJzG-0001bT-CQ; Wed, 08 May 2019 06:39:46 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36254 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hOJzG-0004FM-00; Wed, 08 May 2019 06:39:46 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Chris Marusich Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs., bug#35588: [PATCH] ui: Search matches additional package outputs. 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> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> <87r29czo6e.fsf@gmail.com> <20190505214153.32372-1-me@tobias.gr> <87bm0g6jbp.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> <87mujy8yd8.fsf@gnu.org> <878svhv3re.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 08 May 2019 12:39:44 +0200 In-Reply-To: <878svhv3re.fsf@gmail.com> (Chris Marusich's message of "Tue, 07 May 2019 23:50:29 -0700") Message-ID: <87pnotz0un.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35588 Cc: swedebugia , Tobias Geerinckx-Rice , 35588@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Chris Marusich skribis: > In light of that, I've chosen to exclude all of the following outputs: > > '("out" "doc" "debug" "lib" "static" "bin" "examples" "gui" "tests" > "utils" "include") > > I've also added a test to verify that package outputs are included in > search results. I would exclude only the standard output names used by (guix build gnu-build-system), so: ("out" "doc" "debug" "lib" "include" "bin") That way one can still do =E2=80=98guix search git gui=E2=80=99 or =E2=80= =98guix search bind utils=E2=80=99. > What do you all think of this latest version? Thanks for the new test! LGTM. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 03:22:16 2019 Received: (at 35588-close) by debbugs.gnu.org; 9 May 2019 07:22:16 +0000 Received: from localhost ([127.0.0.1]:34568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOdNg-0008Hh-Bw for submit@debbugs.gnu.org; Thu, 09 May 2019 03:22:16 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOdNe-0008HU-98 for 35588-close@debbugs.gnu.org; Thu, 09 May 2019 03:22:14 -0400 Received: by mail-pf1-f195.google.com with SMTP id t87so842352pfa.2 for <35588-close@debbugs.gnu.org>; Thu, 09 May 2019 00:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=prjGShA0iJnwtWSNQTLBP16XuL1lWTpB4uijodqe4JA=; b=r71VLrfsswqPMc2o0095sQMSOmdegCeqtL2e7QRAJXwT1MV6AsLKw+AAQxVQjCIeXk Gbe0SmLPRekn7iwHg3OymhJUmbby17BWRDPaXZUjJ0QPmHt56BYa/hYxrQ3j4HfZV55/ YHc4UkFjVlblnpL1Y4C6FtvVlsqNDBKpjfS8gyynvF8f6ciMeX7I0qiF2rjint/V25EJ Ad5s2fcrC2vb2SHEYY8C0dpAxj+dciBpf51tLH/Ncc1YbD8ZYOgrPGJ57/GL8PGEx95S KXh/XJFR+zMcMQSoXyTANqLFRdh6V2HhBgdQFno6URairageX4CjmrvcSA4JohmWeHY2 IBJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=prjGShA0iJnwtWSNQTLBP16XuL1lWTpB4uijodqe4JA=; b=kdShSBURigkPL/WLfoxKgw0FcdMGJQh0nPdMVG//TbbSnlMc6Z6hyqkkbcUuWpSMob cZuhW+teNuHaZdyxLGoDpyWKSOb3nPx3qO1ZSpSK3x2dKUxcn7JFimPbEf7AnAylTT+4 MZTE/NYJwt0TJJvMYX2nL0/3SZ23RKqoLpjCCyq4GvN3PSuNDK+XWQaS/O4VH6532R5t axo+5luVkBxAnYTFV1JVDlGkCaJcaIMD7VcWN8IB1I2fxCqqNJB+zMeX/SZ42LIWS66q pEcmlKxEjPlZ0ZIgTNVQ2xtoYgUCT6eHdG8DX/xClX7ZhYF7x1AaBgIdHQV8JcqfEBdE BO2w== X-Gm-Message-State: APjAAAXVFOSGaREUyYeoJWrUDZd+K3JWa2mFl4EQc49ApqGlf5bVuc3c 5ioXJ5QEkZ+BGBDKg3djyjnzxh38 X-Google-Smtp-Source: APXvYqxW54BlN8ntoauGsNwaSuqHrvjWyZxnc73AOU/SuN4qcQHS2SyodoitnXCfsfOAdDVNYvGXzA== X-Received: by 2002:a65:6546:: with SMTP id a6mr3446077pgw.5.1557386527811; Thu, 09 May 2019 00:22:07 -0700 (PDT) Received: from garuda.local ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id g19sm969823pgj.75.2019.05.09.00.22.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 May 2019 00:22:06 -0700 (PDT) From: Chris Marusich To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#35588: [PATCH] ui: Search matches additional package outputs. 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> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> <87r29czo6e.fsf@gmail.com> <20190505214153.32372-1-me@tobias.gr> <87bm0g6jbp.fsf@garuda.local.i-did-not-set--mail-host-address--so-tickle-me> <87muk0kjxf.fsf@gnu.org> <87zhnzxer9.fsf@gmail.com> <87mujy8yd8.fsf@gnu.org> <878svhv3re.fsf@gmail.com> <87pnotz0un.fsf@gnu.org> Date: Thu, 09 May 2019 00:22:03 -0700 In-Reply-To: <87pnotz0un.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 08 May 2019 12:39:44 +0200") Message-ID: <87lfzgcctg.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35588-close Cc: swedebugia , 35588-close@debbugs.gnu.org, Tobias Geerinckx-Rice X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > I would exclude only the standard output names used by (guix build > gnu-build-system), so: > > ("out" "doc" "debug" "lib" "include" "bin") > > That way one can still do =E2=80=98guix search git gui=E2=80=99 or =E2=80= =98guix search bind utils=E2=80=99. I didn't know you could do that! Your suggestion makes sense. I've done as you suggest in commit 387e6b9e340ce4b401f220f72881415623a466f7. Thanks everyone! I'm closing this bug report. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlzT1RsACgkQ3UCaFdgi Rp2r0A/9GHKitI2Oid54NoL3eBuh4K6NgLeDG4nRVDOoJsRn4M+LJVqiDZtggIeQ fKaffTR6oBZtGIeqbLz1A9Op+2+k6IuzABDPlAze3G+E8iZ7h1SJHlmhDng6Rlav C85YoGKpITHekWXxXibdl2MjuYKPI75ZtA+WcWU/x+ofWOx7KCdgp068nbSZchpd sIMNjylyDtQadLkBfAFlJHhn0ev1+ksQ1qPSnempZMpr/H4IeMLY4O43BdLdjpix vkijxShjZP1BM0S3qFRJMcqcKoZyX0sJwCMYmV4YMbkO5p1fKAYxkLcwLeqMLL9g tSHGIv9PGyEv/3H0rBQwwSc2oD26PrgocA6FsQbfmx+9GQSd5OzQWJzC1oRTwg2J fPGxZmBf2LfHE3LYuNnlHi7JMrntjHOfIH0Zo684nSan8jm7c8MOcc8uypxULcSS /pmCBolo2sQCtlvrL2v7lxrQXfVgQsn9YmksrTWQRgT4YkN2ECPcsjp109/TYrne lfGWFXBw1nTtifmEdSvAjr2Rygk9FRcVGtLkuT6cMJ9a08Xr+62B6jiMPXPxCp/F TrIVJN9BCG1MUvLU9Jk3qRE2GsB3C3SmsLTCCDwhbvTLJZ0FB5WoJ8903ee6tN51 M9WgQ3VvwXod7QujNwsAAi+chKNX8JnF07axG0ZDLkJct1HEiWA= =gsX2 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 09 06:18:45 2019 Received: (at control) by debbugs.gnu.org; 9 May 2019 10:18:45 +0000 Received: from localhost ([127.0.0.1]:34697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOg8T-000499-Bg for submit@debbugs.gnu.org; Thu, 09 May 2019 06:18:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOg8S-00048s-9o for control@debbugs.gnu.org; Thu, 09 May 2019 06:18:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOg8N-0006pg-74 for control@debbugs.gnu.org; Thu, 09 May 2019 06:18:39 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=52774 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hOg8L-0003gM-OH for control@debbugs.gnu.org; Thu, 09 May 2019 06:18:39 -0400 Date: Thu, 09 May 2019 12:18:36 +0200 Message-Id: <87d0ksexs3.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #35588 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 35588 fixed close 35588 From unknown Sat Jun 21 10:22:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Jun 2019 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator