aboutsummaryrefslogtreecommitdiff
path: root/guix-package.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-11-07 19:14:22 +0100
committerLudovic Courtès <ludo@gnu.org>2012-11-07 19:14:22 +0100
commit9518856b9b7de297413e99f373909a793fe1303a (patch)
tree3447ad4e40c35bf1036c76892be5e1e7e9857c3f /guix-package.in
parent1227fabb658218447a3b08f7974e7bf0b886a7ed (diff)
downloadguix-9518856b9b7de297413e99f373909a793fe1303a.tar
guix-9518856b9b7de297413e99f373909a793fe1303a.tar.gz
guix-package: Fix handling of the PACKAGE:OUTPUT syntax.
* guix-package.in (guix-package)[find-package]: Return the correct NAME and SUB-DRV when NAME contains #\:. * tests/guix-package.sh (profile): Add test.
Diffstat (limited to 'guix-package.in')
-rw-r--r--guix-package.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix-package.in b/guix-package.in
index c60b15bf28..a5a1b48968 100644
--- a/guix-package.in
+++ b/guix-package.in
@@ -284,8 +284,8 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
(let*-values (((name sub-drv)
(match (string-rindex name #\:)
(#f (values name "out"))
- (colon (values (substring name (+ 1 colon))
- (substring name colon)))))
+ (colon (values (substring name 0 colon)
+ (substring name (+ 1 colon))))))
((name version)
(package-name->name+version name)))
(match (find-packages-by-name name version)