GNU bug report logs - #29927
[PATCH 2/5] profiles: info-dir-file: Don't consider unwanted manifest entries.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: 宋文武 <iyzsong@HIDDEN>; Keywords: patch; merged with #29928; dated Mon, 1 Jan 2018 10:34:05 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Merged 29927 29928. Request was from ludo@HIDDEN (Ludovic Courtès) to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Jan 2018 10:34:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 01 05:33:59 2018
Received: from localhost ([127.0.0.1]:59251 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eVxPr-0000tK-Kw
	for submit <at> debbugs.gnu.org; Mon, 01 Jan 2018 05:33:59 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57812)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iyzsong@HIDDEN>) id 1eVxPp-0000sb-SL
 for submit <at> debbugs.gnu.org; Mon, 01 Jan 2018 05:33:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1eVxPj-0004Py-SF
 for submit <at> debbugs.gnu.org; Mon, 01 Jan 2018 05:33:52 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49681)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <iyzsong@HIDDEN>)
 id 1eVxPj-0004Ps-PZ
 for submit <at> debbugs.gnu.org; Mon, 01 Jan 2018 05:33:51 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48728)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1eVxPi-0006LE-GJ
 for guix-patches@HIDDEN; Mon, 01 Jan 2018 05:33:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <iyzsong@HIDDEN>) id 1eVxPg-0004NW-9F
 for guix-patches@HIDDEN; 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 <iyzsong@HIDDEN>)
 id 1eVxPf-0004Km-Q2
 for guix-patches@HIDDEN; Mon, 01 Jan 2018 05:33:48 -0500
Received: from localhost (36.24.33.173 [36.24.33.173])
 by rezeros.cc (OpenSMTPD) with ESMTPSA id 76d03224
 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); 
 Mon, 1 Jan 2018 10:33:18 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
 by localhost (OpenSMTPD) with ESMTP id edbec164;
 Mon, 1 Jan 2018 10:33:37 +0000 (UTC)
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 2/5] profiles: info-dir-file: Don't consider unwanted manifest
 entries.
Date: Mon,  1 Jan 2018 18:33:33 +0800
Message-Id: <20180101103336.8613-3-iyzsong@HIDDEN>
X-Mailer: git-send-email 2.14.1
In-Reply-To: <20180101103336.8613-1-iyzsong@HIDDEN>
References: <20180101103336.8613-1-iyzsong@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

* 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





Acknowledgement sent to 宋文武 <iyzsong@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#29927; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 7 Mar 2018 14:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.