From a25ac0cdb617c5c26f40ae8eebd77a8948cf43ab Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 31 Mar 2008 21:07:29 +0000 Subject: [PATCH] Fix package selection logic to always properly reject the installed package when another is available and the user wants to reinstall. svn path=/main/trunk/; revision=9652 --- pym/_emerge/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e9d0fe7fd..fa7950d4d 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2706,8 +2706,10 @@ class depgraph(object): cpv=cpv, metadata=metadata, built=built, installed=installed, onlydeps=onlydeps) - if installed and want_reinstall: - matched_packages.insert(0, pkg) + if installed and want_reinstall and matched_packages: + # Reject the installed package unless + # there are no other matches. + break else: matched_packages.append(pkg) if reinstall_for_flags: -- 2.26.2