summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-31 21:07:29 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-31 21:07:29 +0000
commita25ac0cdb617c5c26f40ae8eebd77a8948cf43ab (patch)
tree84e37dca26605b96ce34c74d04727e9040575f36
parentb4dae0f6fcab08f159ae376228a5d5f861e8bfef (diff)
downloadportage-a25ac0cdb617c5c26f40ae8eebd77a8948cf43ab.tar.gz
portage-a25ac0cdb617c5c26f40ae8eebd77a8948cf43ab.tar.bz2
portage-a25ac0cdb617c5c26f40ae8eebd77a8948cf43ab.zip
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
-rw-r--r--pym/_emerge/__init__.py6
1 files 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: