From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVxPz-0006Oc-V6 for guix-patches@gnu.org; Mon, 01 Jan 2018 05:34:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVxPy-0004W4-DF for guix-patches@gnu.org; Mon, 01 Jan 2018 05:34:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50581) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVxPy-0004Vy-9b for guix-patches@gnu.org; Mon, 01 Jan 2018 05:34:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVxPy-0000ug-2v for guix-patches@gnu.org; Mon, 01 Jan 2018 05:34:06 -0500 Subject: [bug#29927] [PATCH 2/5] profiles: info-dir-file: Don't consider unwanted manifest entries. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVxPi-0006LE-GJ for guix-patches@gnu.org; Mon, 01 Jan 2018 05:33:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVxPg-0004NW-9F for guix-patches@gnu.org; Mon, 01 Jan 2018 05:33:50 -0500 Received: from rezeros.cc ([2001:19f0:7001:2f3e:5400:ff:fe84:e55d]:35544) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eVxPf-0004Km-Q2 for guix-patches@gnu.org; Mon, 01 Jan 2018 05:33:48 -0500 From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Mon, 1 Jan 2018 18:33:33 +0800 Message-Id: <20180101103336.8613-3-iyzsong@member.fsf.org> In-Reply-To: <20180101103336.8613-1-iyzsong@member.fsf.org> References: <20180101103336.8613-1-iyzsong@member.fsf.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29927@debbugs.gnu.org * guix/profiles.scm (info-dir-file): Use 'eval-gexp' to filter out those manifest inputs that doesn't have info manuals. --- guix/profiles.scm | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 3c05543be..f6e455c96 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -684,7 +684,19 @@ MANIFEST." (define gzip ;lazy reference (module-ref (resolve-interface '(gnu packages compression)) 'gzip)) - (define build + ;; We only need to build the 'dir' file for inputs that does contain info + ;; manuals. + (define interested + (eval-gexp + #~(filter + (lambda (input) + (file-exists? (string-append input "/share/info"))) + '#$(manifest-inputs manifest)))) + + ;; XXX: We have to pass paths of inputs instead of paths of info files, + ;; because 'gexp-inputs' only adds inputs for strings which satisfies + ;; 'direct-store-path?'. + (define (build inputs) (with-imported-modules '((guix build utils)) #~(begin (use-modules (guix build utils) @@ -708,12 +720,12 @@ MANIFEST." (mkdir-p (string-append #$output "/share/info")) (exit (every install-info - (append-map info-files - '#$(manifest-inputs manifest))))))) + (append-map info-files '#$inputs)))))) - (gexp->derivation "info-dir" build - #:local-build? #t - #:substitutable? #f)) + (mlet* %store-monad ((inputs interested)) + (gexp->derivation "info-dir" (build inputs) + #:local-build? #t + #:substitutable? #f))) (define (ghc-package-cache-file manifest) "Return a derivation that builds the GHC 'package.cache' file for all the -- 2.13.3