From 741c70c63e7a8b3a2b259c6718152c888841c722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 10 May 2013 23:04:39 +0200 Subject: package: Store the output path of packages installed with `-e'. * guix/scripts/package.scm (guix-package)[process-actions](package->tuple): Put the output path in the tuple, not the derivation path. * tests/guix-package.sh: Add test. --- guix/scripts/package.scm | 14 +++++++------- tests/guix-package.sh | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 25ec63c772..5c6a118560 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -648,15 +648,15 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n")) (delete-duplicates deps same?)) (define (package->tuple p) - (let ((path (package-derivation (%store) p)) - (deps (package-transitive-propagated-inputs p))) + ;; Convert package P to a tuple. + ;; When given a package via `-e', install the first of its + ;; outputs (XXX). + (let* ((out (car (package-outputs p))) + (path (package-output (%store) p out)) + (deps (package-transitive-propagated-inputs p))) `(,(package-name p) ,(package-version p) - - ;; When given a package via `-e', install the first of its - ;; outputs (XXX). - ,(car (package-outputs p)) - + ,out ,path ,(canonicalize-deps deps)))) diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 5a514a0dc0..0eeec51e79 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -117,6 +117,7 @@ then guix package --bootstrap -p "$profile" -e "$boot_make" test "`readlink_base "$profile"`" = "$profile-2-link" test -x "$profile/bin/guile" && test -x "$profile/bin/make" + grep "`guix build -e "$boot_make"`" "$profile/manifest" # Make a "hole" in the list of generations, and make sure we can # roll back "over" it. -- cgit v1.2.3