Make --noreplace take precedence over --newuse, as suggested by wolf31o2.
authorZac Medico <zmedico@gentoo.org>
Thu, 27 Mar 2008 04:23:30 +0000 (04:23 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 27 Mar 2008 04:23:30 +0000 (04:23 -0000)
svn path=/main/trunk/; revision=9513

pym/_emerge/__init__.py

index e6dedb9607ab01dc988acce67b4efcf4492e3f1d..bd5c22ac0836a4a4c383c946c9f455a0854dd9eb 100644 (file)
@@ -2574,6 +2574,7 @@ class depgraph(object):
                usepkgonly = "--usepkgonly" in self.myopts
                empty = "empty" in self.myparams
                selective = "selective" in self.myparams
+               noreplace = "--noreplace" in self.myopts
                reinstall = False
                # Behavior of the "selective" parameter depends on
                # whether or not a package matches an argument atom.
@@ -2608,6 +2609,10 @@ class depgraph(object):
                                # descending order
                                cpv_list.reverse()
                                for cpv in cpv_list:
+                                       # Make --noreplace take precedence over --newuse.
+                                       if not installed and noreplace and \
+                                               cpv in vardb.match(atom):
+                                               continue
                                        reinstall_for_flags = None
                                        try:
                                                metadata = dict(izip(db_keys,