aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-03-29 20:35:24 -0700
committerZac Medico <zmedico@gentoo.org>2018-03-29 20:47:55 -0700
commitc5ad40dbe8f74dcdb2b08d42240e217a8ef440e6 (patch)
treeab92f0e8892823aceca815d418bf2eb38dc7a809
parentrepoman man/repoman.1: Add "BEHAVIOR" section (fix bug 650520) (diff)
downloadportage-c5ad40dbe8f74dcdb2b08d42240e217a8ef440e6.tar.gz
portage-c5ad40dbe8f74dcdb2b08d42240e217a8ef440e6.tar.bz2
portage-c5ad40dbe8f74dcdb2b08d42240e217a8ef440e6.zip
depgraph._serialize_tasks: resolve portage/repoman blockers (bug 651936)
When ensuring that all runtime dependencies are installed before a new instance of portage, ignore uninstalls. This makes it possible to solve a blocker between a new version of portage and an older version of repoman, where an uninstall task for the older version of repoman appears in the runtime dependencies of the new instance of portage. Bug: https://bugs.gentoo.org/651936
-rw-r--r--pym/_emerge/depgraph.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 6af7d5714..963bf25f4 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -7671,11 +7671,13 @@ class depgraph(object):
return True
if node not in mergeable_nodes:
return False
- if node == replacement_portage and \
- mygraph.child_nodes(node,
- ignore_priority=priority_range.ignore_medium_soft):
- # Make sure that portage always has all of it's
- # RDEPENDs installed first.
+ if node == replacement_portage and any(
+ getattr(rdep, 'operation', None) != 'uninstall'
+ for rdep in mygraph.child_nodes(node,
+ ignore_priority=priority_range.ignore_medium_soft)):
+ # Make sure that portage always has all of its
+ # RDEPENDs installed first, but ignore uninstalls
+ # (these occur when new portage blocks older repoman).
return False
selected_nodes.add(node)
for child in mygraph.child_nodes(node,