aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages.scm')
-rw-r--r--gnu/packages.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm
index 2d7622d397..47e4f473b5 100644
--- a/gnu/packages.scm
+++ b/gnu/packages.scm
@@ -515,14 +515,18 @@ optionally contain a version number and an output name, as in these examples:
guile@2.0.9:debug
If SPEC does not specify a version number, return the preferred newest
-version; if SPEC does not specify an output, return OUTPUT."
+version; if SPEC does not specify an output, return OUTPUT.
+
+When OUTPUT is false and SPEC does not specify any output, return #f as the
+output."
(let-values (((name version sub-drv)
(package-specification->name+version+output spec output)))
(match (%find-package spec name version)
(#f
(values #f #f))
(package
- (if (member sub-drv (package-outputs package))
+ (if (or (and (not output) (not sub-drv))
+ (member sub-drv (package-outputs package)))
(values package sub-drv)
(leave (G_ "package `~a' lacks output `~a'~%")
(package-full-name package)