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.
This commit is contained in:
Ludovic Courtès 2013-05-10 23:04:39 +02:00
parent 94a4b3b9f2
commit 741c70c63e
2 changed files with 8 additions and 7 deletions

View file

@ -648,15 +648,15 @@ (define (same? d1 d2)
(delete-duplicates deps same?)) (delete-duplicates deps same?))
(define (package->tuple p) (define (package->tuple p)
(let ((path (package-derivation (%store) p)) ;; Convert package P to a tuple.
(deps (package-transitive-propagated-inputs p))) ;; 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-name p)
,(package-version p) ,(package-version p)
,out
;; When given a package via `-e', install the first of its
;; outputs (XXX).
,(car (package-outputs p))
,path ,path
,(canonicalize-deps deps)))) ,(canonicalize-deps deps))))

View file

@ -117,6 +117,7 @@ then
guix package --bootstrap -p "$profile" -e "$boot_make" guix package --bootstrap -p "$profile" -e "$boot_make"
test "`readlink_base "$profile"`" = "$profile-2-link" test "`readlink_base "$profile"`" = "$profile-2-link"
test -x "$profile/bin/guile" && test -x "$profile/bin/make" 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 # Make a "hole" in the list of generations, and make sure we can
# roll back "over" it. # roll back "over" it.