summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-21 15:15:42 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-21 15:15:42 -0700
commitdb3521bdd5c57a20a8f3bf04a84fcd65430e39c9 (patch)
treefef3368f49ae68bb759c050b76afd21deeb11f9b /pym
parentfcd742f219611c4f80bf4f24c198890f8a44f85f (diff)
downloadportage-db3521bdd5c57a20a8f3bf04a84fcd65430e39c9.tar.gz
portage-db3521bdd5c57a20a8f3bf04a84fcd65430e39c9.tar.bz2
portage-db3521bdd5c57a20a8f3bf04a84fcd65430e39c9.zip
test_merge_order: test solve blocker no-overlap
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/tests/resolver/test_merge_order.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 62d16d98b..bae9bcadb 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -17,6 +17,9 @@ class MergeOrderTestCase(TestCase):
"EAPI" : "2",
"DEPEND" : "!!app-misc/installed-blocker-a",
},
+ "app-misc/blocker-update-order-a-1" : {
+ "RDEPEND" : ">=app-misc/installed-old-version-blocks-a-2"
+ },
"app-misc/blocker-runtime-a-1" : {},
"app-misc/blocker-runtime-hard-a-1" : {},
"app-misc/circ-buildtime-a-0": {},
@@ -81,6 +84,10 @@ class MergeOrderTestCase(TestCase):
"DEPEND" : "!app-misc/blocker-buildtime-a",
"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
},
+ "app-misc/installed-old-version-blocks-a-1" : {
+ "RDEPEND" : "!app-misc/installed-old-version-blocks-a",
+ },
+ "app-misc/installed-old-version-blocks-a-2" : {},
"app-misc/some-app-a-1": {
"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
},
@@ -109,6 +116,9 @@ class MergeOrderTestCase(TestCase):
"DEPEND" : "!app-misc/blocker-buildtime-a",
"RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
},
+ "app-misc/installed-old-version-blocks-a-1" : {
+ "RDEPEND" : "!app-misc/installed-old-version-blocks-a",
+ },
}
test_cases = (
@@ -163,6 +173,15 @@ class MergeOrderTestCase(TestCase):
["app-misc/blocker-buildtime-a"],
success = True,
mergelist = ["app-misc/blocker-buildtime-a-1"]),
+ # We're installing a package that an old version of
+ # an installed package blocks. However, an update is
+ # available to the old package. The old package should
+ # be updated first, in order to solve the blocker without
+ # any need for blocking packages to temporarily overlap.
+ ResolverPlaygroundTestCase(
+ ["app-misc/blocker-update-order-a"],
+ success = True,
+ mergelist = ["app-misc/installed-old-version-blocks-a-2", "app-misc/blocker-update-order-a-1"]),
# installed package has runtime blocker that
# should cause it to be uninstalled
# TODO: distinguish between install/uninstall tasks in mergelist
@@ -171,7 +190,10 @@ class MergeOrderTestCase(TestCase):
success = True,
mergelist = ["app-misc/blocker-runtime-a-1", "app-misc/installed-blocker-a-1", "!app-misc/blocker-runtime-a"]),
# We have a soft buildtime blocker against an installed
- # package that should cause it to be uninstalled.
+ # package that should cause it to be uninstalled. Note that with
+ # soft blockers, the blocking packages are allowed to temporarily
+ # overlap. This allows any essential programs/libraries provided
+ # by both packages to be available at all times.
# TODO: distinguish between install/uninstall tasks in mergelist
ResolverPlaygroundTestCase(
["app-misc/blocker-buildtime-unbuilt-a"],