summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-31 23:12:14 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-31 23:12:14 +0000
commita03edf16639f99543b5472d3af70715bd84d882f (patch)
tree3bea8d165389239c17f10bfa4d290390c01fb207
parenta25ac0cdb617c5c26f40ae8eebd77a8948cf43ab (diff)
downloadportage-a03edf16639f99543b5472d3af70715bd84d882f.tar.gz
portage-a03edf16639f99543b5472d3af70715bd84d882f.tar.bz2
portage-a03edf16639f99543b5472d3af70715bd84d882f.zip
In the package selection loop, move the installed package rejection
code as early as possible. svn path=/main/trunk/; revision=9654
-rw-r--r--pym/_emerge/__init__.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index fa7950d4d..54cdb2abd 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2572,6 +2572,11 @@ class depgraph(object):
for db, pkg_type, built, installed, db_keys in dbs:
if existing_node:
break
+ if installed and not find_existing_node:
+ want_reinstall = empty or \
+ (found_available_arg and not selective)
+ if want_reinstall and matched_packages:
+ continue
if hasattr(db, "xmatch"):
cpv_list = db.xmatch("match-all", atom)
else:
@@ -2698,20 +2703,11 @@ class depgraph(object):
pkgsettings.setcpv(cpv, mydb=metadata)
metadata["USE"] = pkgsettings["PORTAGE_USE"]
myeb = cpv
- want_reinstall = False
- if installed:
- want_reinstall = empty or \
- (found_available_arg and not selective)
pkg = Package(type_name=pkg_type, root=root,
cpv=cpv, metadata=metadata,
built=built, installed=installed,
onlydeps=onlydeps)
- if installed and want_reinstall and matched_packages:
- # Reject the installed package unless
- # there are no other matches.
- break
- else:
- matched_packages.append(pkg)
+ matched_packages.append(pkg)
if reinstall_for_flags:
self._reinstall_nodes[pkg] = \
reinstall_for_flags