From a81a22889c1eaec729badb498adc3b381b77818e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 11 Feb 2011 16:09:22 -0800 Subject: depgraph: fix distorted display of virtuals As mentioned in bug #353933, comment #4, special new-style virtual atoms generated/distorted by _expand_new_virtuals() can prevent extract_affecting_use() from working properly. This is fixed by saving the original atoms so that the depgraph can map them back into place at the appropriate step in dependency evaluation. --- pym/_emerge/depgraph.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pym/_emerge') diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 004103c0d..fc84be6fe 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1259,6 +1259,12 @@ class depgraph(object): for atom, child in self._minimize_children( pkg, dep_priority, root_config, selected_atoms[pkg]): + # If this was a specially generated virtual atom + # from dep_check, map it back to the original, in + # order to avoid distortion in places like display + # or conflict resolution code. + atom = getattr(atom, '_orig_atom', atom) + if ignore_blockers and atom.blocker: # For --with-bdeps, ignore build-time only blockers # that originate from built packages. @@ -1309,6 +1315,13 @@ class depgraph(object): for atom, child in self._minimize_children( pkg, self._priority(runtime=True), root_config, atoms): + + # If this was a specially generated virtual atom + # from dep_check, map it back to the original, in + # order to avoid distortion in places like display + # or conflict resolution code. + atom = getattr(atom, '_orig_atom', atom) + # This is a GLEP 37 virtual, so its deps are all runtime. mypriority = self._priority(runtime=True) if not atom.blocker: -- cgit v1.2.3-1-g7c22