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/portage/tests/resolver/test_merge_order.py
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/portage/tests/resolver/test_merge_order.py')
-rw-r--r--lib/portage/tests/resolver/test_merge_order.py27
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/portage/tests/resolver/test_merge_order.py b/lib/portage/tests/resolver/test_merge_order.py
index f81fd2f6f..0510a0636 100644
--- a/lib/portage/tests/resolver/test_merge_order.py
+++ b/lib/portage/tests/resolver/test_merge_order.py
@@ -217,12 +217,23 @@ class MergeOrderTestCase(TestCase):
"IUSE" : "X +encode",
"RDEPEND" : "|| ( >=media-video/ffmpeg-0.6.90_rc0-r2[X=,encode=] >=media-video/libav-0.6.90_rc[X=,encode=] )",
},
+ "x11-base/xorg-drivers-1.20-r2": {
+ "EAPI": "7",
+ "IUSE": "+video_cards_fbdev",
+ "PDEPEND": "x11-base/xorg-server video_cards_fbdev? ( x11-drivers/xf86-video-fbdev )",
+ },
"x11-base/xorg-server-1.14.1" : {
"EAPI" : "5",
"SLOT": "0/1.14.1",
"DEPEND" : "media-libs/mesa",
"RDEPEND" : "media-libs/mesa",
+ "PDEPEND": "x11-base/xorg-drivers",
},
+ "x11-drivers/xf86-video-fbdev-0.5.0-r1": {
+ "EAPI": "7",
+ "DEPEND": "x11-base/xorg-server:=",
+ "RDEPEND": "x11-base/xorg-server",
+ }
}
installed = {
@@ -299,12 +310,24 @@ class MergeOrderTestCase(TestCase):
"USE" : "encode",
"RDEPEND" : "|| ( >=media-video/ffmpeg-0.6.90_rc0-r2[X=,encode=] >=media-video/libav-0.6.90_rc[X=,encode=] )",
},
+ "x11-base/xorg-drivers-1.20-r2": {
+ "EAPI": "7",
+ "IUSE": "+video_cards_fbdev",
+ "USE": "video_cards_fbdev",
+ "PDEPEND": "x11-base/xorg-server x11-drivers/xf86-video-fbdev",
+ },
"x11-base/xorg-server-1.14.1" : {
"EAPI" : "5",
"SLOT": "0/1.14.1",
"DEPEND" : "media-libs/mesa",
"RDEPEND" : "media-libs/mesa",
+ "PDEPEND": "x11-base/xorg-drivers",
},
+ "x11-drivers/xf86-video-fbdev-0.5.0-r1": {
+ "EAPI": "7",
+ "DEPEND": "x11-base/xorg-server:0/1.14.1=",
+ "RDEPEND": "x11-base/xorg-server",
+ }
}
test_cases = (
@@ -486,10 +509,10 @@ class MergeOrderTestCase(TestCase):
# Both deps are already satisfied by installed packages, but
# the := dep is given higher priority in merge order.
ResolverPlaygroundTestCase(
- ["media-libs/mesa", "x11-base/xorg-server"],
+ ["media-libs/mesa", "x11-drivers/xf86-video-fbdev", "x11-base/xorg-server"],
success=True,
all_permutations = True,
- mergelist = ['x11-base/xorg-server-1.14.1', 'media-libs/mesa-9.1.3']),
+ mergelist = ['x11-base/xorg-server-1.14.1', 'media-libs/mesa-9.1.3', 'x11-drivers/xf86-video-fbdev-0.5.0-r1']),
# Test prioritization of the find_smallest_cycle function, which should
# minimize the use of installed packages to break cycles. If installed
# packages must be used to break cycles, then it should prefer to do this