[PATCH 2/5] profiles: info-dir-file: Don't consider unwanted manifest entries.

  • Done
  • quality assurance status badge
Details
3 participants
  • ???
  • Leo Prikler
  • Ludovic Courtès
Owner
unassigned
Submitted by
???
Severity
normal
Merged with
?
(address . guix-patches@gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
20180101103336.8613-3-iyzsong@member.fsf.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(-)

Toggle diff (45 lines)
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
L
L
Ludovic Courtès wrote on 7 Mar 2018 15:03
control message for bug #29927
(address . control@debbugs.gnu.org)
87o9k0rnhv.fsf@gnu.org
merge 29927 29928
L
L
Leo Prikler wrote on 11 May 2021 15:34
Re: [PATCH 0/5] Optimize profile hooks
(name . ???)(address . iyzsong@member.fsf.org)
65a2d7596fb69e0d139b4e2b7a63b354a8f6bf48.camel@student.tugraz.at
merge 29928 29926
merge 29928 29927
thanks

This series (29928 29926 29927 29925 29929 29930) has by now slept on
the mailing list for more than three years.
Should we still try to merge it? If so, could you send an updated
version, that is not spread across six threads?

Thanks,
Leo
?