diff options
Diffstat (limited to 'gnu/packages.scm')
| -rw-r--r-- | gnu/packages.scm | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm index 92bab7228ad..bec8163b2b4 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm | |||
| @@ -306,7 +306,7 @@ return its return value." | |||
| 306 | ;;; Package specification. | 306 | ;;; Package specification. |
| 307 | ;;; | 307 | ;;; |
| 308 | 308 | ||
| 309 | (define* (%find-package spec name version #:key fallback?) | 309 | (define* (%find-package spec name version) |
| 310 | (match (find-best-packages-by-name name version) | 310 | (match (find-best-packages-by-name name version) |
| 311 | ((pkg . pkg*) | 311 | ((pkg . pkg*) |
| 312 | (unless (null? pkg*) | 312 | (unless (null? pkg*) |
| @@ -314,10 +314,6 @@ return its return value." | |||
| 314 | (warning (_ "choosing ~a@~a from ~a~%") | 314 | (warning (_ "choosing ~a@~a from ~a~%") |
| 315 | (package-name pkg) (package-version pkg) | 315 | (package-name pkg) (package-version pkg) |
| 316 | (location->string (package-location pkg)))) | 316 | (location->string (package-location pkg)))) |
| 317 | (when fallback? | ||
| 318 | (warning (_ "deprecated NAME-VERSION syntax; \ | ||
| 319 | use NAME@VERSION instead~%"))) | ||
| 320 | |||
| 321 | (match (package-superseded pkg) | 317 | (match (package-superseded pkg) |
| 322 | ((? package? new) | 318 | ((? package? new) |
| 323 | (info (_ "package '~a' has been superseded by '~a'~%") | 319 | (info (_ "package '~a' has been superseded by '~a'~%") |
| @@ -328,16 +324,7 @@ use NAME@VERSION instead~%"))) | |||
| 328 | (x | 324 | (x |
| 329 | (if version | 325 | (if version |
| 330 | (leave (_ "~A: package not found for version ~a~%") name version) | 326 | (leave (_ "~A: package not found for version ~a~%") name version) |
| 331 | (if (not fallback?) | 327 | (leave (_ "~A: unknown package~%") name))))) |
| 332 | ;; XXX: Fallback to the older specification style with an hyphen | ||
| 333 | ;; between NAME and VERSION, for backward compatibility. | ||
| 334 | (call-with-values | ||
| 335 | (lambda () | ||
| 336 | (hyphen-separated-name->name+version name)) | ||
| 337 | (cut %find-package spec <> <> #:fallback? #t)) | ||
| 338 | |||
| 339 | ;; The fallback case didn't find anything either, so bail out. | ||
| 340 | (leave (_ "~A: unknown package~%") name)))))) | ||
| 341 | 328 | ||
| 342 | (define (specification->package spec) | 329 | (define (specification->package spec) |
| 343 | "Return a package matching SPEC. SPEC may be a package name, or a package | 330 | "Return a package matching SPEC. SPEC may be a package name, or a package |
