mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
profiles: Report "pseudo-upgrades" as upgrades, not downgrades.
Reported by Andreas Enge <andreas@enge.fr> at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19764#19>. * guix/profiles.scm (manifest-transaction-effects): Use 'version>=?' instead of 'version>?'. * tests/profiles.scm ("manifest-transaction-effects and pseudo-upgrades"): New test.
This commit is contained in:
parent
cde1e967cf
commit
3bea13bb1f
2 changed files with 10 additions and 2 deletions
|
@ -331,8 +331,8 @@ (define (manifest-entry->pattern entry)
|
|||
(let* ((pattern (manifest-entry->pattern entry))
|
||||
(previous (manifest-lookup manifest pattern))
|
||||
(newer? (and previous
|
||||
(version>? (manifest-entry-version entry)
|
||||
(manifest-entry-version previous)))))
|
||||
(version>=? (manifest-entry-version entry)
|
||||
(manifest-entry-version previous)))))
|
||||
(loop rest
|
||||
(if previous install (cons entry install))
|
||||
(if (and previous newer?)
|
||||
|
|
|
@ -169,6 +169,14 @@ (define glibc
|
|||
(and (null? remove) (null? install) (null? upgrade)
|
||||
(equal? (list (cons guile-2.0.9 guile-1.8.8)) downgrade)))))
|
||||
|
||||
(test-assert "manifest-transaction-effects and pseudo-upgrades"
|
||||
(let* ((m0 (manifest (list guile-2.0.9)))
|
||||
(t (manifest-transaction (install (list guile-2.0.9)))))
|
||||
(let-values (((remove install upgrade downgrade)
|
||||
(manifest-transaction-effects m0 t)))
|
||||
(and (null? remove) (null? install) (null? downgrade)
|
||||
(equal? (list (cons guile-2.0.9 guile-2.0.9)) upgrade)))))
|
||||
|
||||
(test-assertm "profile-derivation"
|
||||
(mlet* %store-monad
|
||||
((entry -> (package->manifest-entry %bootstrap-guile))
|
||||
|
|
Loading…
Reference in a new issue