aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-15 23:33:17 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-15 23:51:28 +0200
commit079d1273912da55c69113601b48bb704ed354c86 (patch)
tree40f66450132dc4b331ac41dca6407087ea445686
parent56fbf2629f10b134e5f6e916e4fc33b0c0658da8 (diff)
downloadguix-079d1273912da55c69113601b48bb704ed354c86.tar
guix-079d1273912da55c69113601b48bb704ed354c86.tar.gz
guix package: Allow separate install of several outputs of the same package.
* guix/scripts/package.scm (guix-package)[process-actions](same-package?): New procedure. Use it instead of `alist-delete' when filtering out duplicate packages from the profile.
-rw-r--r--guix/scripts/package.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 68869b4cec..5c3947dd63 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -693,6 +693,12 @@ more information.~%"))
(delete-duplicates deps same?))
+ (define (same-package? tuple name out)
+ (match tuple
+ ((tuple-name _ tuple-output _ ...)
+ (and (equal? name tuple-name)
+ (equal? out tuple-output)))))
+
(define (package->tuple p)
;; Convert package P to a tuple.
;; When given a package via `-e', install the first of its
@@ -816,8 +822,11 @@ more information.~%"))
(packages (append install*
(fold (lambda (package result)
(match package
- ((name _ ...)
- (alist-delete name result))))
+ ((name _ out _ ...)
+ (filter (negate
+ (cut same-package? <>
+ name out))
+ result))))
(fold alist-delete installed remove)
install*))))