summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-20 20:49:08 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-20 20:49:08 -0700
commit037ef49ed8763eba774a8e69f9b060793cbb7d68 (patch)
treef05d50de0916fbbfa5c83645069f354c35e28713
parentcf3d92869b4e7371aed6171d1bf77fc2150bf016 (diff)
downloadportage-037ef49ed8763eba774a8e69f9b060793cbb7d68.tar.gz
portage-037ef49ed8763eba774a8e69f9b060793cbb7d68.tar.bz2
portage-037ef49ed8763eba774a8e69f9b060793cbb7d68.zip
test_merge_order: test hard blocker resolution
-rw-r--r--pym/_emerge/depgraph.py3
-rw-r--r--pym/portage/tests/resolver/test_merge_order.py16
2 files changed, 14 insertions, 5 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 4789a0ca2..3ef47f8ab 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -5531,8 +5531,7 @@ class depgraph(object):
msg.append("\n")
- sys.stderr.write("".join(msg))
- sys.stderr.flush()
+ writemsg("".join(msg), noiselevel=-1)
if "--quiet" not in self._frozen_config.myopts:
show_blocker_docs_link()
diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py
index 6c929f729..e7f1aa48c 100644
--- a/pym/portage/tests/resolver/test_merge_order.py
+++ b/pym/portage/tests/resolver/test_merge_order.py
@@ -11,6 +11,7 @@ class MergeOrderTestCase(TestCase):
ebuilds = {
"app-misc/blocker-buildtime-a-1" : {},
"app-misc/blocker-runtime-a-1" : {},
+ "app-misc/blocker-runtime-hard-a-1" : {},
"app-misc/circ-post-runtime-a-1": {
"PDEPEND": "app-misc/circ-post-runtime-b",
},
@@ -24,8 +25,9 @@ class MergeOrderTestCase(TestCase):
"RDEPEND": "app-misc/circ-runtime-a",
},
"app-misc/installed-blocker-a-1" : {
+ "EAPI" : "2",
"DEPEND" : "!app-misc/blocker-buildtime-a",
- "RDEPEND" : "!app-misc/blocker-runtime-a",
+ "RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
},
"app-misc/some-app-a-1": {
"RDEPEND": "app-misc/circ-runtime-a app-misc/circ-runtime-b",
@@ -37,9 +39,10 @@ class MergeOrderTestCase(TestCase):
installed = {
"app-misc/installed-blocker-a-1" : {
+ "EAPI" : "2",
"DEPEND" : "!app-misc/blocker-buildtime-a",
- "RDEPEND" : "!app-misc/blocker-runtime-a",
- }
+ "RDEPEND" : "!app-misc/blocker-runtime-a !!app-misc/blocker-runtime-hard-a",
+ },
}
test_cases = (
@@ -72,6 +75,13 @@ class MergeOrderTestCase(TestCase):
["app-misc/blocker-runtime-a"],
success = True,
mergelist = ["app-misc/blocker-runtime-a-1", "app-misc/installed-blocker-a-1", "!app-misc/blocker-runtime-a"]),
+ # An installed package has a hard runtime blocker that
+ # will not resolve automatically (unless the option
+ # requested in bug 250286 is implemented).
+ ResolverPlaygroundTestCase(
+ ["app-misc/blocker-runtime-hard-a"],
+ success = False,
+ mergelist = ['app-misc/blocker-runtime-hard-a-1', '!!app-misc/blocker-runtime-hard-a']),
)
playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)