summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-30 00:01:08 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-30 00:01:08 +0000
commit7aa2774e27020c0ddffecb0a66f3b7ff3ea5b019 (patch)
tree65fbbb4fbbc8c98be77bfa89e4c85de8cda30d66
parent734d8f21c0de0df2eba4e326a0c281ca0283e920 (diff)
downloadportage-7aa2774e27020c0ddffecb0a66f3b7ff3ea5b019.tar.gz
portage-7aa2774e27020c0ddffecb0a66f3b7ff3ea5b019.tar.bz2
portage-7aa2774e27020c0ddffecb0a66f3b7ff3ea5b019.zip
Fix virtual blocker code inside _expand_new_virtuals to correctly handle
!!atom blockers. svn path=/main/trunk/; revision=13739
-rw-r--r--pym/portage/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 2da9e198b..a9c11fade 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -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]))