From 9e90fc771386a288e1bcf032edbb75bbfc472e7c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 26 Jul 2016 18:18:53 +0200 Subject: profiles: Output in 'package->manifest-entry' defaults to "out". Fixes . Reported by Dylan Jeffers . * guix/profiles.scm (package->manifest-entry): Change #:output to default to "out". (packages->manifest): Add 'package?' in second 'match' clause. * tests/profiles.scm ("package->manifest-entry defaults to \"out\""): New test. --- guix/profiles.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'guix') diff --git a/guix/profiles.scm b/guix/profiles.scm index 1adb143c16..db807a8136 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -163,9 +163,8 @@ (define (profile-manifest profile) (call-with-input-file file read-manifest) (manifest '())))) -(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." +(define* (package->manifest-entry package #:optional (output "out")) + "Return a manifest entry for the OUTPUT of package PACKAGE." (let ((deps (map (match-lambda ((label package) (gexp-input package)) @@ -175,7 +174,7 @@ (define* (package->manifest-entry package #:optional output) (manifest-entry (name (package-name package)) (version (package-version package)) - (output (or output (car (package-outputs package)))) + (output output) (item package) (dependencies (delete-duplicates deps)) (search-paths (package-transitive-native-search-paths package))))) @@ -188,8 +187,8 @@ (define (packages->manifest packages) (map (match-lambda ((package output) (package->manifest-entry package output)) - (package - (package->manifest-entry package))) + ((? package? package) + (package->manifest-entry package))) packages))) (define (manifest->gexp manifest) -- cgit v1.2.3