profiles: Honor search paths of propagated inputs.

Fixes <http://bugs.gnu.org/22073>.
Reported by Federico Beffa <beffa@ieee.org>.

* guix/profiles.scm (package->manifest-entry): Use
'package-transitive-native-search-paths' when computing
'search-paths' field.
* tests/profiles.scm ("package->manifest-entry, search paths"): New test.
This commit is contained in:
Ludovic Courtès 2015-12-20 14:42:56 +01:00
parent aa8e051532
commit ccda8f7d7f
2 changed files with 10 additions and 1 deletions

View File

@ -176,7 +176,7 @@ omitted or #f, use the first output of PACKAGE."
(output (or output (car (package-outputs package))))
(item package)
(dependencies (delete-duplicates deps))
(search-paths (package-native-search-paths package)))))
(search-paths (package-transitive-native-search-paths package)))))
(define (packages->manifest packages)
"Return a list of manifest entries, one for each item listed in PACKAGES.

View File

@ -32,6 +32,7 @@
#:use-module (ice-9 regex)
#:use-module (ice-9 popen)
#:use-module (rnrs io ports)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-64))
@ -224,6 +225,14 @@
(package-native-search-paths
packages:guile-2.0)))))))))
(test-assert "package->manifest-entry, search paths"
;; See <http://bugs.gnu.org/22073>.
(let ((mpl (@ (gnu packages python) python2-matplotlib)))
(lset= eq?
(package-transitive-native-search-paths mpl)
(manifest-entry-search-paths
(package->manifest-entry mpl)))))
(test-assertm "etc/profile"
;; Make sure we get an 'etc/profile' file that at least defines $PATH.
(mlet* %store-monad