diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2017-05-01 15:45:41 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-01 17:27:54 +0200 |
| commit | e30c2be10da8929e42aafc7770257e84de49ffbb (patch) | |
| tree | b231b51f23698b095a096a52614ae179162591c5 /gnu | |
| parent | 6d1a5e5ffdbb7d15ffad7918213d96ee8c6e9164 (diff) | |
packages: Remove support for PACKAGE-VERSION deprecated syntax.
This syntax had been deprecated since 2016-02-28.
* gnu/packages.scm (%find-package): Remove #:fallback? parameter and handling.
* tests/guix-build.sh: Remove test for "time-1.7" syntax.
* doc/guix.texi (Invoking guix lint): Update 'guix lint' output in example.
Diffstat (limited to 'gnu')
| -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 |
