aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-12-01 23:08:04 -0800
committerZac Medico <zmedico@gentoo.org>2020-12-02 00:06:27 -0800
commit07a604537e746814613dc171a5c09072ef0266af (patch)
treedc47082a80c1acd3ac048ed82dd131582febdabd /lib/_emerge
parentUpdates for portage-3.0.11 release (diff)
downloadportage-07a604537e746814613dc171a5c09072ef0266af.tar.gz
portage-07a604537e746814613dc171a5c09072ef0266af.tar.bz2
portage-07a604537e746814613dc171a5c09072ef0266af.zip
find_smallest_cycle: don't merge satisfied PDEPEND too early
After PDEPENDs have been neglected by the find_smallest_cycle function, do not try to merge them too early if they are already satisfied by an installed package. This fixes incorrect merge order for PDEPEND cycles involving xorg-server and xorg-drivers, which was triggered by commit 5095c2023595a75e2848f1ad3dbe25b5fb451a44 because it gave PDEPEND higher priority than satisfied buildtime dependencies. Fixes: 5095c2023595 ("find_smallest_cycle: enhance search prioritization") Reported-by: josef64 in #gentoo-portage Bug: https://bugs.gentoo.org/754903 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/DepPrioritySatisfiedRange.py1
-rw-r--r--lib/_emerge/depgraph.py8
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/_emerge/DepPrioritySatisfiedRange.py b/lib/_emerge/DepPrioritySatisfiedRange.py
index fb0d7db4e..f546590e0 100644
--- a/lib/_emerge/DepPrioritySatisfiedRange.py
+++ b/lib/_emerge/DepPrioritySatisfiedRange.py
@@ -93,6 +93,7 @@ class DepPrioritySatisfiedRange:
ignore_medium = _ignore_runtime
ignore_medium_soft = _ignore_satisfied_buildtime_slot_op
ignore_medium_post = _ignore_runtime_post
+ ignore_medium_post_satisifed = _ignore_satisfied_runtime_post
ignore_soft = _ignore_optional
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 1271bda3e..0450291d4 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -8052,18 +8052,18 @@ class depgraph:
(selected_nodes[0],), noiselevel=-1)
if selected_nodes and ignore_priority is not None:
- # Try to merge ignored medium_post deps as soon as possible
+ # Try to merge neglected medium_post deps as soon as possible
# if they're not satisfied by installed packages.
for node in selected_nodes:
children = set(mygraph.child_nodes(node))
- soft = children.difference(
+ medium_post_satisifed = children.difference(
mygraph.child_nodes(node,
ignore_priority = \
- DepPrioritySatisfiedRange.ignore_soft))
+ DepPrioritySatisfiedRange.ignore_medium_post_satisifed))
medium_post = children.difference(
mygraph.child_nodes(node,
ignore_priority=DepPrioritySatisfiedRange.ignore_medium_post))
- medium_post -= soft
+ medium_post -= medium_post_satisifed
for child in medium_post:
if child in selected_nodes:
continue