summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-01-14 03:56:38 +0000
committerZac Medico <zmedico@gentoo.org>2009-01-14 03:56:38 +0000
commitc25c3d3752eb825387662f87331dafdabc547011 (patch)
tree98c84a284ba649c2868da798a1178d88f608826d
parentSimplify depgraph._select_pkg_from_graph() by using match_pkgs(). (trunk r12494) (diff)
downloadportage-multirepo-c25c3d3752eb825387662f87331dafdabc547011.tar.gz
portage-multirepo-c25c3d3752eb825387662f87331dafdabc547011.tar.bz2
portage-multirepo-c25c3d3752eb825387662f87331dafdabc547011.zip
Bug #254860 - Inside _expand_new_virtuals(), generate instances of Atom
instead of plain strings, so calling code can assume that only Atom instances will be returned when strict mode is enabled. (trunk r12495) svn path=/main/branches/2.1.6/; revision=12505
-rw-r--r--pym/portage/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index e94d617b..2e33b330 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -6351,13 +6351,14 @@ 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("!" + virtual_atoms[0])
+ a.append(portage.dep.Atom("!" + virtual_atoms[0]))
else:
- mycheck[1].append("="+y[0]) # pull in the new-style virtual
+ # 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.
for y in mychoices:
- a.append(x.replace(mykey, y))
+ a.append(portage.dep.Atom(x.replace(mykey, y, 1)))
if isblocker and not a:
# Probably a compound virtual. Pass the atom through unprocessed.
newsplit.append(x)