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

Previous Next

Package: guix-patches;

Reported by: 宋文武 <iyzsong <at> member.fsf.org>

Date: Mon, 1 Jan 2018 10:34:05 UTC

Severity: normal

Tags: patch

Merged with 29925, 29926, 29928, 29929, 29930

Done: 宋文武 <iyzsong <at> outlook.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29927 in the body.
You can then email your comments to 29927 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29927; Package guix-patches. (Mon, 01 Jan 2018 10:34:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to 宋文武 <iyzsong <at> member.fsf.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 01 Jan 2018 10:34:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> member.fsf.org>
To: guix-patches <at> gnu.org
Cc: 宋文武 <iyzsong <at> member.fsf.org>
Subject: [PATCH 2/5] profiles: info-dir-file: Don't consider unwanted manifest
 entries.
Date: Mon,  1 Jan 2018 18:33:33 +0800
* 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





Merged 29927 29928. Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Wed, 07 Mar 2018 14:05:02 GMT) Full text and rfc822 format available.

Merged 29925 29926 29927 29928 29929 29930. Request was from Leo Prikler <leo.prikler <at> student.tugraz.at> to control <at> debbugs.gnu.org. (Tue, 11 May 2021 13:36:02 GMT) Full text and rfc822 format available.

Merged 29925 29926 29927 29928 29929 29930. Request was from Leo Prikler <leo.prikler <at> student.tugraz.at> to control <at> debbugs.gnu.org. (Tue, 11 May 2021 13:36:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Jun 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 319 days ago.

Previous Next


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