Skip to content
Snippets Groups Projects
Commit 9518856b authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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.
parent 1227fabb
No related branches found
No related tags found
No related merge requests found
...@@ -284,8 +284,8 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@")) ...@@ -284,8 +284,8 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
(let*-values (((name sub-drv) (let*-values (((name sub-drv)
(match (string-rindex name #\:) (match (string-rindex name #\:)
(#f (values name "out")) (#f (values name "out"))
(colon (values (substring name (+ 1 colon)) (colon (values (substring name 0 colon)
(substring name colon))))) (substring name (+ 1 colon))))))
((name version) ((name version)
(package-name->name+version name))) (package-name->name+version name)))
(match (find-packages-by-name name version) (match (find-packages-by-name name version)
......
...@@ -40,4 +40,7 @@ guix-package -b -p "$profile" -r "guile-bootstrap-2.0" ...@@ -40,4 +40,7 @@ guix-package -b -p "$profile" -r "guile-bootstrap-2.0"
test -L "$profile-3-link" test -L "$profile-3-link"
test -f "$profile/bin/make" && ! test -f "$profile/bin/guile" test -f "$profile/bin/make" && ! test -f "$profile/bin/guile"
# Make sure the `:' syntax works.
guix-package -b -i "libsigsegv:lib" -n
rm "$profile" "$profile-"[0-9]* rm "$profile" "$profile-"[0-9]*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment