From 7aa2774e27020c0ddffecb0a66f3b7ff3ea5b019 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 30 Jun 2009 00:01:08 +0000 Subject: [PATCH] Fix virtual blocker code inside _expand_new_virtuals to correctly handle !!atom blockers. svn path=/main/trunk/; revision=13739 --- pym/portage/__init__.py | 5 +++-- 1 file 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])) -- 2.26.2