summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-15 07:47:28 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-15 07:47:28 +0000
commit6bb42a2cbaa089ca6ee2f134a742551d5a00d9e8 (patch)
tree274034e54bf3d27822db3df5e3471eab8e8f4f94 /pym
parent7344c6b7476d29d2655c805771d69f268042a615 (diff)
downloadportage-6bb42a2cbaa089ca6ee2f134a742551d5a00d9e8.tar.gz
portage-6bb42a2cbaa089ca6ee2f134a742551d5a00d9e8.tar.bz2
portage-6bb42a2cbaa089ca6ee2f134a742551d5a00d9e8.zip
Fix --newuse reinstall logic broken by the previous commit.
svn path=/main/trunk/; revision=9337
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index d16c4fc20..c0058fca2 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -2496,6 +2496,7 @@ class depgraph(object):
usepkgonly = "--usepkgonly" in self.myopts
empty = "empty" in self.myparams
selective = "selective" in self.myparams
+ reinstall = False
# Behavior of the "selective" parameter depends on
# whether or not a package matches an argument atom.
# If an installed package provides an old-style
@@ -2514,7 +2515,8 @@ class depgraph(object):
for db, pkg_type, built, installed, db_keys in dbs:
if existing_node:
break
- if not selective and installed and not find_existing_node and \
+ if installed and not find_existing_node and \
+ (reinstall or not selective) and \
(matched_packages or empty):
# We only need to select an installed package in the
# following cases:
@@ -2627,6 +2629,8 @@ class depgraph(object):
self._reinstall_for_flags(
forced_flags, old_use, old_iuse,
cur_use, cur_iuse)
+ if reinstall_for_flags:
+ reinstall = True
if not installed:
must_reinstall = empty or \
(myarg and not selective)