From patchwork Sun May 3 15:01:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 21874 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0723F27BBE4; Sun, 3 May 2020 16:03:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id 9739B27BBE1 for ; Sun, 3 May 2020 16:03:30 +0100 (BST) Received: from localhost ([::1]:37958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVG9S-0006F7-5y for patchwork@mira.cbaines.net; Sun, 03 May 2020 11:03:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVG92-0005o5-07 for guix-patches@gnu.org; Sun, 03 May 2020 11:03:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVG90-0000lJ-Pa for guix-patches@gnu.org; Sun, 03 May 2020 11:03:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVG90-0005CQ-MJ for guix-patches@gnu.org; Sun, 03 May 2020 11:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#39258] [PATCH v4 1/3] DRAFT packages: Add fields to packages cache. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 May 2020 15:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 39258@debbugs.gnu.org Cc: arunisaac@systemreboot.net, mail@ambrevar.xyz, ludo@gnu.org, zimoun Received: via spool by 39258-submit@debbugs.gnu.org id=B39258.158851814219877 (code B ref 39258); Sun, 03 May 2020 15:03:02 +0000 Received: (at 39258) by debbugs.gnu.org; 3 May 2020 15:02:22 +0000 Received: from localhost ([127.0.0.1]:57636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVG8L-0005AX-UI for submit@debbugs.gnu.org; Sun, 03 May 2020 11:02:22 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:32904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVG8K-0005A5-K1 for 39258@debbugs.gnu.org; Sun, 03 May 2020 11:02:20 -0400 Received: by mail-wm1-f51.google.com with SMTP id v8so13605639wma.0 for <39258@debbugs.gnu.org>; Sun, 03 May 2020 08:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y04cqSlE39HhVd4m/qFcpwd9f0fVV7i91JQx8qrUMzw=; b=iY8ptmiXpAF652gZ6YEcpqqPhwG6//eBSIgM17SO0LVy6U4+0YCBEcQdJgyOYotVXl nKm/Eg1lpUGKNc0fsq+yW1RKdx3l5f9WGdU/GQ7X0tU0qXBwP+pxDDaeY1CfURc0ws/6 +Ied4NsLnPqGcitldVLl4FxgOS/nUkeGytw3YoDs1u+h7ffR+kPH48V8ntAOlXZouM24 Lh/EF0bC9GsGOE+f5SJL91DWlBqjZ/zA9YUv0kzyuqR1ffw+vTD6pwY7tp1kW7DL5xdi Y5qpfB6fgXGM5RyJbTPK3WLLP/J5l98U5L6x/hDa52l420ltWsZzFCgccoArXMrvnzGn 7ADg== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y04cqSlE39HhVd4m/qFcpwd9f0fVV7i91JQx8qrUMzw=; b=CFh9bbvHqcwlvgDhaf2+hemC2FMfPQebkmCD1rJ/O97XEmBiw0C284YxEaazFpKCLY vwqNvsZRxuL/jsCSpwy2ZeoVAxu0wlpb7vXPi3d8Skle1Au5W9wQCUSt5x3XNgBmGaox qM/l2KQF/V96Ky2XB4V59M4s9nMBTYou9z22g4ESMWDI68sKoIJwKeU3EollkIN5QTee 8cz8y70nrjGjoBKAucqTKV9Bcn531iMfXelDmEHFtbmklzPVJCsZyqOvYkgIs6FM3ZvT yTLjnA1XD3saFHXkVnj28anpu7bgOPvuDXwq5BhiSbc+CrH6JKd/E4fo9C5OjHmrXfGd wRPg== X-Gm-Message-State: AGi0Pubt5C+XHK11zW7PLhdWHLBjo5tgHCyDPNkokYkVBUHttr9lRcvx BEbekYrIXaT6hwlbfKu9hMjMKxSk X-Google-Smtp-Source: APiQypI7s7YEhwiDdvCYaY67HeKN5HTLiuK/MeDcBvi7CARVNcjedPgpTuG6SxDuQZEDVY7ATFcFGw== X-Received: by 2002:a1c:24d4:: with SMTP id k203mr9857854wmk.49.1588518134442; Sun, 03 May 2020 08:02:14 -0700 (PDT) Received: from localhost.localdomain (57.246.195.77.rev.sfr.net. [77.195.246.57]) by smtp.gmail.com with ESMTPSA id x13sm9787829wmc.5.2020.05.03.08.02.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 08:02:14 -0700 (PDT) From: zimoun Date: Sun, 3 May 2020 17:01:52 +0200 Message-Id: <20200503150154.26532-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200503150154.26532-1-zimon.toutoune@gmail.com> References: <20200503150154.26532-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- gnu/packages.scm | 51 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/gnu/packages.scm b/gnu/packages.scm index d22c992bb1..fa18f81487 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -33,6 +33,8 @@ #:use-module (guix profiles) #:use-module (guix describe) #:use-module (guix deprecation) + #:use-module (guix build-system) + #:use-module (guix licenses) #:use-module (ice-9 vlist) #:use-module (ice-9 match) #:use-module (ice-9 binary-ports) @@ -212,7 +214,8 @@ package module." (match vector (#(name version module symbol outputs supported? deprecated? - file line column) + file line column + _ _ _ _ _ _ _ _ _ _) (proc name version result #:outputs outputs #:location (and file @@ -269,7 +272,11 @@ package names. Return #f on failure." (match item (#(name version module symbol outputs supported? deprecated? - file line column) + file line column + synopsis description home-page + build-system-name build-system-description + supported-systems direct-inputs + license-name license-uri license-comment) (vhash-cons name item vhash)))) vlist-null lst)) @@ -316,7 +323,8 @@ decreasing version order." (if (and (cache-is-authoritative?) cache) (match (cache-lookup cache name) (#f #f) - ((#(_ versions modules symbols _ _ _ _ _ _) ...) + ((#(_ versions modules symbols _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _) ...) (fold (lambda (version* module symbol result) (if (or (not version) (version-prefix? version version*)) @@ -339,7 +347,8 @@ matching NAME and VERSION." (#f '()) ((#(name versions modules symbols outputs supported? deprecated? - files lines columns) ...) + files lines columns + _ _ _ _ _ _ _ _ _ _) ...) (fold (lambda (version* file line column result) (if (and file (or (not version) @@ -401,7 +410,39 @@ reducing the memory footprint." `(,(location-file loc) ,(location-line loc) ,(location-column loc)) - '(#f #f #f)))) + '(#f #f #f))) + + ,(package-synopsis package) + ,(package-description package) + ,(package-home-page package) + + ,@(let ((build-system + (package-build-system package))) + `(,(symbol->string + (build-system-name build-system)) + ,(build-system-description build-system))) + + ,(package-transitive-supported-systems package) + + ,(delete-duplicates + (sort (map package-full-name + (match (package-direct-inputs package) + (((labels inputs . _) ...) + (filter package? inputs)))) + stringuris? + ;; see gpl1+ comment #f + ,(license-comment (car licenses)))) + ((? license? license) + `(,(license-name license) + ,(license-uri license) + ,(license-comment license))) + (_ '(#f #f #f)))) result) (vhash-consq package #t seen)))))) (_ From patchwork Sun May 3 15:01:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 21875 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E98A427BBE4; Sun, 3 May 2020 16:03:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id 750DD27BBE1 for ; Sun, 3 May 2020 16:03:33 +0100 (BST) Received: from localhost ([::1]:38214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVG9V-0006VH-2X for patchwork@mira.cbaines.net; Sun, 03 May 2020 11:03:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVG92-0005o7-0A for guix-patches@gnu.org; Sun, 03 May 2020 11:03:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVG91-0000lK-7c for guix-patches@gnu.org; Sun, 03 May 2020 11:03:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVG91-0005CY-4I for guix-patches@gnu.org; Sun, 03 May 2020 11:03:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#39258] [PATCH v4 2/3] DRAFT packages: Add new procedure 'fold-packages*'. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 May 2020 15:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 39258@debbugs.gnu.org Cc: arunisaac@systemreboot.net, mail@ambrevar.xyz, ludo@gnu.org, zimoun Received: via spool by 39258-submit@debbugs.gnu.org id=B39258.158851814819902 (code B ref 39258); Sun, 03 May 2020 15:03:03 +0000 Received: (at 39258) by debbugs.gnu.org; 3 May 2020 15:02:28 +0000 Received: from localhost ([127.0.0.1]:57640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVG8R-0005An-8T for submit@debbugs.gnu.org; Sun, 03 May 2020 11:02:27 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVG8P-0005AN-DX for 39258@debbugs.gnu.org; Sun, 03 May 2020 11:02:25 -0400 Received: by mail-wr1-f67.google.com with SMTP id x18so17833251wrq.2 for <39258@debbugs.gnu.org>; Sun, 03 May 2020 08:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g/Ap+DsFXX88hbi+Yvm1efNAcOgiB+00QdKk0X55xTc=; b=h8CE3txtoW2DMHQVxDWhhGVIKkbsKKPieGNdtY4LGffYuTGeRMJZ8nQqIO5QAc8WX9 eNHfn0F+VY3qD6BDUM1nYno5isLWW7nnk1NqzL5edC2yDspUR5PcW7xADD3w301CHS+3 EeuuoLEwWa7scP/1Eb1mVS3o2bPzCPwuvjS2CniWBBsEzx9cikBdb4n5/t1DhWYsovfT 5TVLROpFiVQK3MS3AJqCeJT1b9CPdPkBCatjAsNCOe6HgGihtJ5ExuXHZ0BQNEJJ7nMo xKUe30c0hH6hlR9Vd4wRVGA9qE0eSB1nP7xvDXd9bG36OR3kHPxduJzbY48iiUiKkiz2 9ShQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g/Ap+DsFXX88hbi+Yvm1efNAcOgiB+00QdKk0X55xTc=; b=Q/fbeGgqtvtX6oqH67Fc5tj/eR6e7xrzcZKTHHRa8HaKTUhj00cueX4LlIAvXKt3iX iBa1AmG5x9B6h6anU1OTU5pQqMw17BgkQxMX0wbl5tHkPFDcS3T2w99n1DiflTSpzHhW 2MNr2PDx4gBEDDqaulfgcS63uGRPa4qE0JhHnMwdZnnC1q7yzwWxYloZPZ+VaxmeV+kQ uPs5JYbn/6s6p0Xak+eArtFIhSUyaRZpIBBrTg+k6Nc7Xaz6vNMEY1/CyZ5U76Mtny5q 5tH3nwPJnnS7o7HsXPmSpT6TzKwBA0WjxEBJQPAPa9npvjrfiZZ4EWrtVVXRBZTM81DW 6w+w== X-Gm-Message-State: AGi0PuZNvOzZbOh4xz1DSZIh920u3OE6hM2nIFEXegCa9mHdtUDAN+eG DZ9/L2k2wQu4C2vzq6XwSA+1AAqq X-Google-Smtp-Source: APiQypI+C5VHCpwASn0z9sOBkb905oUanZs6V+nM8elFaB1cKtUSw6gI/znRc2Ce3she9ZtYcZCcbA== X-Received: by 2002:adf:fcc8:: with SMTP id f8mr14213653wrs.230.1588518139268; Sun, 03 May 2020 08:02:19 -0700 (PDT) Received: from localhost.localdomain (57.246.195.77.rev.sfr.net. [77.195.246.57]) by smtp.gmail.com with ESMTPSA id x13sm9787829wmc.5.2020.05.03.08.02.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 08:02:18 -0700 (PDT) From: zimoun Date: Sun, 3 May 2020 17:01:53 +0200 Message-Id: <20200503150154.26532-3-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200503150154.26532-1-zimon.toutoune@gmail.com> References: <20200503150154.26532-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- gnu/packages.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++ guix/ui.scm | 29 +++++++++++++++++----------- tests/packages.scm | 31 ++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 11 deletions(-) diff --git a/gnu/packages.scm b/gnu/packages.scm index fa18f81487..a0c5835b8b 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -55,6 +55,7 @@ fold-packages fold-available-packages + fold-packages* find-newest-available-packages find-packages-by-name @@ -253,6 +254,52 @@ is guaranteed to never traverse the same package twice." init modules)) +(define (fold-packages* proc init) + "Fold (PROC PACKAGE RESULT) over the list of available packages. When a +package cache is available, this procedure does not actually load any package +module. Moreover when package cache is available, this procedure +re-constructs a new package skipping some package record field. The usage of +this procedure is User Interface (ui) only." + (define cache + (load-package-cache (current-profile))) + + (define license (@@ (guix licenses) license)) + + (if (and cache (cache-is-authoritative?)) + (vhash-fold (lambda (name vector result) + (match vector + (#(name version module symbol outputs + supported? deprecated? + file line column + synopsis description home-page + build-system-name build-system-description + supported-systems direct-inputs + license-name license-uri license-comment) + (proc (package + (name name) + (version version) + (source #f) ;TODO: ? + (build-system + (build-system + (name (string->symbol build-system-name)) + (description build-system-description) + (lower #f))) ; never used by ui + (inputs ; list of "full-name@version" + (list 'cache direct-inputs)) + (outputs outputs) + (synopsis synopsis) + (description description) + (license (license + license-name license-uri license-comment)) + (home-page home-page) + (supported-systems (list 'cache supported-systems)) + (location (location + file line column))) + result)))) + init + cache) + (fold-packages proc init))) + (define %package-cache-file ;; Location of the package cache. "/lib/guix/package.cache") diff --git a/guix/ui.scm b/guix/ui.scm index 1e24fe5dca..257d119798 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1416,13 +1416,10 @@ HYPERLINKS? is true, emit hyperlink escape sequences when appropriate." ;; the initial "+ " prefix. (if (> width 2) (- width 2) width)) - (define (dependencies->recutils packages) - (let ((list (string-join (delete-duplicates - (map package-full-name - (sort packages packagerecutils - (fill-paragraph list width* - (string-length "dependencies: "))))) + (define (dependencies->string packages) + (string-join (delete-duplicates + (map package-full-name + (sort packages packagerecutils (filter package? inputs))))) + (let ((dependencies + (match (package-direct-inputs p) + (('cache inputs) + (string-join inputs)) + (((labels inputs . _) ...) + (dependencies->string (filter package? inputs)))))) + (string->recutils + (fill-paragraph dependencies width* + (string-length "dependencies: "))))) (format port "location: ~a~%" (or (and=> (package-location p) (if hyperlinks? location->hyperlink location->string)) diff --git a/tests/packages.scm b/tests/packages.scm index 7a8b5e4a2d..4504f6cf33 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1169,6 +1169,37 @@ ((one) (eq? one guile-2.0)))) +(test-assert "fold-packages* hello with/without cache" + (let () + (define (equal-package? p1 p2) + ;; fold-package* re-constructs a new package skipping 'source' and 'lower' + ;; so equal? does not apply + (and (equal? (package-full-name p1) (package-full-name p2)) + (equal? (package-description p1) (package-description p2)))) + + (define no-cache + (fold-packages* (lambda (p r) + (if (string=? (package-name p) "hello") + p + r)) + #f)) + + (define from-cache + (call-with-temporary-directory + (lambda (cache) + (generate-package-cache cache) + (mock ((guix describe) current-profile (const cache)) + (mock ((gnu packages) cache-is-authoritative? (const #t)) + (fold-packages* (lambda (p r) + (if (string=? (package-name p) "hello") + p + r)) + #f)))))) + + (and (equal? no-cache hello) + (equal-package? from-cache hello) + (equal-package? no-cache from-cache)))) + (test-assert "fold-available-packages with/without cache" (let () (define no-cache From patchwork Sun May 3 15:01:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 21872 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8E43827BBE4; Sun, 3 May 2020 16:03:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id 4D97027BBE1 for ; Sun, 3 May 2020 16:03:13 +0100 (BST) Received: from localhost ([::1]:37510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVG9A-0005r8-JU for patchwork@mira.cbaines.net; Sun, 03 May 2020 11:03:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVG92-0005o6-0C for guix-patches@gnu.org; Sun, 03 May 2020 11:03:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVG91-0000lM-KU for guix-patches@gnu.org; Sun, 03 May 2020 11:03:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVG91-0005Ch-H3 for guix-patches@gnu.org; Sun, 03 May 2020 11:03:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#39258] [PATCH v4 3/3] DRAFT guix package: Use cache in 'find-packages-by-description'. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 May 2020 15:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39258 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 39258@debbugs.gnu.org Cc: arunisaac@systemreboot.net, mail@ambrevar.xyz, ludo@gnu.org, zimoun Received: via spool by 39258-submit@debbugs.gnu.org id=B39258.158851814919915 (code B ref 39258); Sun, 03 May 2020 15:03:03 +0000 Received: (at 39258) by debbugs.gnu.org; 3 May 2020 15:02:29 +0000 Received: from localhost ([127.0.0.1]:57644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVG8T-0005B8-0N for submit@debbugs.gnu.org; Sun, 03 May 2020 11:02:29 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVG8R-0005AW-3K for 39258@debbugs.gnu.org; Sun, 03 May 2020 11:02:27 -0400 Received: by mail-wr1-f67.google.com with SMTP id f13so17774925wrm.13 for <39258@debbugs.gnu.org>; Sun, 03 May 2020 08:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iUk5aRBWe+0sYmv5/HX8bzBOaoivPCZk8Goly8Oin4A=; b=kXrcXCCe7XIBPjLQgMIyH2n2sUT5eM7cCLF3JKEPEQFq7FJPXaOLU0DYTM4v1R/XX/ HHTZxgoo6CWDhzpSmzSrFJmfU+wOngIY48XnFB6GZE8x+PuRnALU3HlBILJcWzZxhMhf HasSQmgDS6gUCdjedF6Z2WFoCKKCNdDNch3vWgpJV9M+MzyH3yYLTMbB9o6quOBqeFHx W8dHuvcB80215JeAHJ7dz9ZWGKzOqs2Lpr827Ilm+Wsk2l5+PgE2+NtzoskGAHQUvOQv n5XLVtl70ASvXiKAQSbu8UCg1EZBNQ9TBjgtrU50mtMfw/VXHeld8jazBWK5dRep/Q6H zeIQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iUk5aRBWe+0sYmv5/HX8bzBOaoivPCZk8Goly8Oin4A=; b=YLoJEEaFjmEgFE+33mRONwSDspcOE8FmHWWG7HQJ66Xn4khB6OUWZzHXnk2rcfR5iM MeXdugDjDpoR+sOzI39ps42aish0XiSyME+XFJ+k4JFY2+bK3V1zSpa1VuhU4aVjV3Pv RjkhI0ezAZ5ueH347upkS8n7MSYbUF3jV9mo3kTFT5GJZ2rgcjXf/pkOQ4HiYPJr6W3E /HYMvJAv3ADgPUvzOWQQWR/tWEDwFt4QQUVuNk1kgtZU8ShjP0xCn4ViBlOUAizhNCXy 2+WrS6/s/jR6NxTfCZT8WKOacj7pfCMLftyaAKLPa5HszBfC4ZYsVT0nJKpde4QWGNoM 4Ndg== X-Gm-Message-State: AGi0Pua/lFzib4rTRNGdBI4Dc/+6dbrfUoOMt4mdCVsmwFWfiaPdXvX8 yU2eu+pt4xsJdydiYePtkojz7WD8 X-Google-Smtp-Source: APiQypI/fDORsUp1o7/lXlNckqXRq+1eqXZp7lUQCbp3F3iPATsw08yflmm2IUvJg8Nvldc+NRfNaA== X-Received: by 2002:a5d:6b85:: with SMTP id n5mr14583110wrx.370.1588518141213; Sun, 03 May 2020 08:02:21 -0700 (PDT) Received: from localhost.localdomain (57.246.195.77.rev.sfr.net. [77.195.246.57]) by smtp.gmail.com with ESMTPSA id x13sm9787829wmc.5.2020.05.03.08.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2020 08:02:20 -0700 (PDT) From: zimoun Date: Sun, 3 May 2020 17:01:54 +0200 Message-Id: <20200503150154.26532-4-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200503150154.26532-1-zimon.toutoune@gmail.com> References: <20200503150154.26532-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- guix/scripts/package.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index badb1dcd38..6b982eb172 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -174,7 +174,7 @@ hooks\" run when building the profile." "Return a list of pairs: packages whose name, synopsis, description, or output matches at least one of REGEXPS sorted by relevance, and its non-zero relevance score." - (let ((matches (fold-packages (lambda (package result) + (let ((matches (fold-packages* (lambda (package result) (if (package-superseded package) result (match (package-relevance package