diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2016-09-06 23:14:07 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2016-09-06 23:22:10 +0200 |
| commit | 01afdab89c6a91f4cd05d3c4f4ff95a0402703eb (patch) | |
| tree | 7be146245b7b7053532f38476399e5b8f5b2f9c4 /gnu/packages.scm | |
| parent | 03763d6473bcd6c7a84bcc3a6aa7bc2d1ee1e44f (diff) | |
packages: Add 'package-superseded' and associated support.
This provides a way to mark a package as superseded by another one.
Upgrades replace superseded packages with their replacement.
* guix/packages.scm (package-superseded, deprecated-package): New
procedures.
* gnu/packages.scm (%find-package): Check for 'package-superseded'.
* guix/scripts/package.scm (transaction-upgrade-entry)[supersede]: New
procedure. Call it when 'package-superseded' is true.
* tests/guix-build.sh: Add test for a superseded package.
* tests/packages.scm ("package-superseded")
("transaction-upgrade-entry, superseded package"): New tests.
Diffstat (limited to 'gnu/packages.scm')
| -rw-r--r-- | gnu/packages.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/packages.scm b/gnu/packages.scm index 68a9eef2ad9..5d60423a3ae 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm | |||
| @@ -305,7 +305,14 @@ return its return value." | |||
| 305 | (when fallback? | 305 | (when fallback? |
| 306 | (warning (_ "deprecated NAME-VERSION syntax; \ | 306 | (warning (_ "deprecated NAME-VERSION syntax; \ |
| 307 | use NAME@VERSION instead~%"))) | 307 | use NAME@VERSION instead~%"))) |
| 308 | pkg) | 308 | |
| 309 | (match (package-superseded pkg) | ||
| 310 | ((? package? new) | ||
| 311 | (info (_ "package '~a' has been superseded by '~a'~%") | ||
| 312 | (package-name pkg) (package-name new)) | ||
| 313 | new) | ||
| 314 | (#f | ||
| 315 | pkg))) | ||
| 309 | (_ | 316 | (_ |
| 310 | (if version | 317 | (if version |
| 311 | (leave (_ "~A: package not found for version ~a~%") name version) | 318 | (leave (_ "~A: package not found for version ~a~%") name version) |
