From e9ad7be4e102c375ce10b61f8cc441150dc4a681 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 1 Apr 2008 21:58:58 +0000 Subject: [PATCH] Use pkgcmp() instead of == and best() for correctness in case of implicit -r0. (trunk r9672) svn path=/main/branches/2.1.2/; revision=9673 --- pym/portage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index f764dbfc2..30b1e2b19 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5426,8 +5426,10 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None): for myslot in intersecting_slots: myversion = versions[myslot] o_version = o_versions[myslot] - if myversion != o_version: - if myversion == best([myversion, o_version]): + difference = pkgcmp(catpkgsplit(myversion)[1:], + catpkgsplit(o_version)[1:]) + if difference: + if difference > 0: has_upgrade = True else: has_downgrade = True -- 2.26.2