Remove obsolete blocker expansion code from _expand_new_virtuals.
authorZac Medico <zmedico@gentoo.org>
Tue, 30 Jun 2009 23:26:36 +0000 (23:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 30 Jun 2009 23:26:36 +0000 (23:26 -0000)
svn path=/main/trunk/; revision=13751

pym/portage/__init__.py

index 69b8fda119aa40f45c185176231899cf1288df51..dcffbfb6f1d778634760aea7163d2b3f46664aed 100644 (file)
@@ -6945,9 +6945,6 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                        newsplit.append(x)
                        continue
                match_atom = x
-               if isblocker:
-                       match_atom = x.lstrip("!")
-                       isblocker = x[:-len(match_atom)]
                pkgs = []
                matches = portdb.match(match_atom)
                # Use descending order to prefer higher versions.
@@ -6998,17 +6995,10 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                        if not mycheck[0]:
                                raise portage.exception.ParseError(
                                        "%s: %s '%s'" % (y[0], mycheck[1], depstring))
-                       if isblocker:
-                               virtual_atoms = [atom for atom in mycheck[1] \
-                                       if not atom.startswith("!")]
-                               if len(virtual_atoms) == 1:
-                                       # It wouldn't make sense to block all the components of a
-                                       # compound virtual, so only a single atom block is allowed.
-                                       a.append(portage.dep.Atom(isblocker + virtual_atoms[0]))
-                       else:
-                               # pull in the new-style virtual
-                               mycheck[1].append(portage.dep.Atom("="+y[0]))
-                               a.append(mycheck[1])
+
+                       # pull in the new-style virtual
+                       mycheck[1].append(portage.dep.Atom("="+y[0]))
+                       a.append(mycheck[1])
                # Plain old-style virtuals.  New-style virtuals are preferred.
                if not pkgs:
                        if repoman:
@@ -7026,7 +7016,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                                                portdb.aux_get(matches[-1], ['PROVIDE'])[0].split():
                                                a.append(new_atom)
 
-               if not a and not isblocker and mychoices:
+               if not a and mychoices:
                        # Check for a virtual package.provided match.
                        for y in mychoices:
                                new_atom = portage.dep.Atom(x.replace(mykey, dep_getkey(y), 1))
@@ -7039,10 +7029,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                elif len(a) == 1:
                        newsplit.append(a[0])
                else:
-                       if isblocker:
-                               newsplit.extend(a)
-                       else:
-                               newsplit.append(['||'] + a)
+                       newsplit.append(['||'] + a)
 
        return newsplit