summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-31 23:14:42 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-31 23:14:42 +0000
commitb6c67eb366257312bbfda9a87221b252f647010b (patch)
treed2148efd17bc93500781d95a3a11df874252a9db /bin
parent1c9e38f9f01deef58aecfc619fd5605503f2f09a (diff)
downloadportage-b6c67eb366257312bbfda9a87221b252f647010b.tar.gz
portage-b6c67eb366257312bbfda9a87221b252f647010b.tar.bz2
portage-b6c67eb366257312bbfda9a87221b252f647010b.zip
In the package selection loop, move the installed package rejection
code as early as possible. (trunk r9654) svn path=/main/branches/2.1.2/; revision=9655
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge16
1 files changed, 6 insertions, 10 deletions
diff --git a/bin/emerge b/bin/emerge
index f9ea202a1..931b04132 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -2222,6 +2222,11 @@ class depgraph:
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:
@@ -2345,20 +2350,11 @@ class depgraph:
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