GNU bug report logs -
#22073
Fwd: search-paths and propagated inputs
Previous Next
Reported by: Federico Beffa <beffa <at> ieee.org>
Date: Wed, 2 Dec 2015 08:19:01 UTC
Severity: normal
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
Message #8 received at 22073 <at> debbugs.gnu.org (full text, mbox):
Looking at my manifest file I see that, e.g., the entry for
'python-matplotlib' lists all recursively propagated
dependencies. Differently from this the 'search-paths' entry only lists
the entries defined in the package (in this case none), neglecting the
search paths in the 'propagated-inputs'.
If I understand correctly, this behavior is defined by this function (from
guix/profiles.scm):
(define* (package->manifest-entry package #:optional output)
"Return a manifest entry for the OUTPUT of package PACKAGE. When OUTPUT is
omitted or #f, use the first output of PACKAGE."
(let ((deps (map (match-lambda
((label package)
(gexp-input package))
((label package output)
(gexp-input package output)))
(package-transitive-propagated-inputs package))))
(manifest-entry
(name (package-name package))
(version (package-version package))
(output (or output (car (package-outputs package))))
(item package)
(dependencies (delete-duplicates deps))
(search-paths (package-native-search-paths package)))))
To get all the required search paths recursively we should replace the
last 'manifest-entry' slot with a call to a function like this:
(define (collect-package-search-paths package)
(define (collect-search-paths package)
(let ((propagated-inputs (package-propagated-inputs package))
(search-paths (package-native-search-paths package)))
(append search-paths
(append-map
(match-lambda
((name pkg . rest) (collect-search-paths pkg))
(_ '()))
propagated-inputs))))
(delete-duplicates (collect-search-paths package)))
Or, am I missing how this works?
Regards,
Fede
This bug report was last modified 9 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.