Fix virtual blocker code inside _expand_new_virtuals to correctly handle
authorZac Medico <zmedico@gentoo.org>
Tue, 30 Jun 2009 00:01:08 +0000 (00:01 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 30 Jun 2009 00:01:08 +0000 (00:01 -0000)
!!atom blockers.

svn path=/main/trunk/; revision=13739

pym/portage/__init__.py

index 2da9e198b5b8a5fa7be454b45ad733955a08234c..a9c11fadea8543b2ceb09ad80282ee46b749d4d2 100644 (file)
@@ -6941,7 +6941,8 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                        continue
                match_atom = x
                if isblocker:
-                       match_atom = x[1:]
+                       match_atom = x.lstrip("!")
+                       isblocker = x[:-len(match_atom)]
                pkgs = []
                matches = portdb.match(match_atom)
                # Use descending order to prefer higher versions.
@@ -7003,7 +7004,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                                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("!" + virtual_atoms[0]))
+                                       a.append(portage.dep.Atom(isblocker + virtual_atoms[0]))
                        else:
                                # pull in the new-style virtual
                                mycheck[1].append(portage.dep.Atom("="+y[0]))