From 037ef49ed8763eba774a8e69f9b060793cbb7d68 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 20 May 2011 20:49:08 -0700 Subject: [PATCH] test_merge_order: test hard blocker resolution --- pym/_emerge/depgraph.py | 3 +-- pym/portage/tests/resolver/test_merge_order.py | 16 +++++++++++++--- 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) -- 2.26.2