From fce30c479e97c4ed7ee97b8e26252c9d9ba1c6a4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 1 Apr 2008 21:58:37 +0000 Subject: [PATCH] Use pkgcmp() instead of == and best() for correctness in case of implicit -r0. svn path=/main/trunk/; revision=9672 --- pym/portage/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 53efef3e6..ef2d65f0c 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5451,8 +5451,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