summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-28 21:46:02 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-02 15:17:26 -0800
commit62c2c5a0c0e8dfaa6e252f753b4867d14396e9e1 (patch)
treec8fc8abb88e96677bed06be1e82e1880d4a9b4d6
parent271d85ca801ea1f69e88531bd0201fa8627bf24e (diff)
downloadportage-62c2c5a0c0e8dfaa6e252f753b4867d14396e9e1.tar.gz
portage-62c2c5a0c0e8dfaa6e252f753b4867d14396e9e1.tar.bz2
portage-62c2c5a0c0e8dfaa6e252f753b4867d14396e9e1.zip
depgraph: fix get_dep_chain unicode handling
-rw-r--r--pym/_emerge/depgraph.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 71bd96396..2b9ce5051 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2191,7 +2191,7 @@ class depgraph(object):
def _get_dep_chain(self, pkg, target_atom=None, unsatisfied_dependency=False):
"""
Returns a list of (atom, node_type) pairs that represent a dep chain.
- If target_atom is None, the first package shown is pkg's paretn.
+ If target_atom is None, the first package shown is pkg's parent.
If target_atom is not None the first package shown is pkg.
If unsatisfied_dependency is True, the first parent is select who's
dependency is not satisfied by 'pkg'. This is need for USE changes.
@@ -2209,7 +2209,7 @@ class depgraph(object):
for dep_str in "DEPEND", "RDEPEND", "PDEPEND":
affecting_use.update(extract_affecting_use(pkg.metadata[dep_str], target_atom))
affecting_use.difference_update(pkg.use.mask, node.use.force)
- pkg_name = pkg.cpv
+ pkg_name = _unicode_decode("%s") % (pkg.cpv,)
if affecting_use:
usedep = []
for flag in affecting_use:
@@ -2219,13 +2219,13 @@ class depgraph(object):
usedep.append("-"+flag)
pkg_name += "[%s]" % ",".join(usedep)
- dep_chain.append(( _unicode_decode(pkg_name), _unicode_decode(pkg.type_name)))
+ dep_chain.append((pkg_name, pkg.type_name))
while node is not None:
traversed_nodes.add(node)
if isinstance(node, DependencyArg):
- dep_chain.append((_unicode_decode(node), "argument"))
+ dep_chain.append((_unicode_decode("%s") % (node,), "argument"))
elif node is not pkg:
for ppkg, patom in all_parents[child]:
@@ -2250,7 +2250,7 @@ class depgraph(object):
affecting_use.difference_update(node.use.mask, \
node.use.force)
- pkg_name = node.cpv
+ pkg_name = _unicode_decode("%s") % (node.cpv,)
if affecting_use:
usedep = []
for flag in affecting_use:
@@ -2260,7 +2260,7 @@ class depgraph(object):
usedep.append("-"+flag)
pkg_name += "[%s]" % ",".join(usedep)
- dep_chain.append(( _unicode_decode(pkg_name), _unicode_decode(node.type_name)))
+ dep_chain.append((pkg_name, node.type_name))
if node not in self._dynamic_config.digraph:
# The parent is not in the graph due to backtracking.
@@ -2278,7 +2278,8 @@ class depgraph(object):
selected_parent = parent
child = node
else:
- dep_chain.append(( _unicode_decode(parent), "argument"))
+ dep_chain.append(
+ (_unicode_decode("%s") % (parent,), "argument"))
selected_parent = None
break
else: