From 067329d6d3377d9a2808c436b6dd7888350dc3ae Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 27 Mar 2020 21:56:54 +0530 Subject: guix: Use package metadata cache for package search. * guix/scripts/package.scm (process-query): Call search-packages and display-package-search-results instead of find-packages-by-description and display-search-results respectively. * guix/ui.scm (package-metadata->recutils): New function. (%package-metrics): Use package-metadata record field accessors. (package-relevance): Rename argument package to package-metadata. (display-package-search-results): New function. --- guix/scripts/package.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guix/scripts/package.scm') diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 110d4f2977..c11f92f5a2 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2016 Benz Schenk ;;; Copyright © 2016 Chris Marusich ;;; Copyright © 2019 Tobias Geerinckx-Rice +;;; Copyright © 2020 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -770,9 +771,9 @@ processed, #f otherwise." (_ #f)) opts)) (regexps (map (cut make-regexp* <> regexp/icase) patterns)) - (matches (find-packages-by-description regexps))) + (matches (search-packages (current-profile) regexps))) (leave-on-EPIPE - (display-search-results matches (current-output-port))) + (display-package-search-results matches (current-output-port))) #t)) (('show requested-name) -- cgit v1.2.3