From fd66f626a5047972439c7aabcb57a7383b0f03cb Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 20 Jun 2012 03:05:26 -0700 Subject: [PATCH] ResolverPlayground: distinguish uninstall merge --- pym/portage/tests/resolver/ResolverPlayground.py | 8 ++++++-- pym/portage/tests/resolver/test_merge_order.py | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index 8c806c74b..0476ed4dd 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -746,8 +746,12 @@ class ResolverPlaygroundResult(object): if x.metadata["repository"] != "test_repo": repo_str = _repo_separator + x.metadata["repository"] mergelist_str = x.cpv + repo_str - if x.type_name == "binary": - mergelist_str = "[binary]" + mergelist_str + if x.built: + if x.operation == "merge": + desc = x.type_name + else: + desc = x.operation + mergelist_str = "[%s]%s" % (desc, mergelist_str) self.mergelist.append(mergelist_str) if self.depgraph._dynamic_config._needed_use_config_changes: diff --git a/pym/portage/tests/resolver/test_merge_order.py b/pym/portage/tests/resolver/test_merge_order.py index adff84d2b..5b5709afe 100644 --- a/pym/portage/tests/resolver/test_merge_order.py +++ b/pym/portage/tests/resolver/test_merge_order.py @@ -376,7 +376,7 @@ class MergeOrderTestCase(TestCase): success = True, all_permutations = True, ambiguous_merge_order = True, - mergelist = [("app-misc/blocker-runtime-a-1", "app-misc/blocker-runtime-b-1"), "app-misc/installed-blocker-a-1", ("!app-misc/blocker-runtime-a", "!app-misc/blocker-runtime-b")]), + mergelist = [("app-misc/blocker-runtime-a-1", "app-misc/blocker-runtime-b-1"), "[uninstall]app-misc/installed-blocker-a-1", ("!app-misc/blocker-runtime-a", "!app-misc/blocker-runtime-b")]), # We have a soft buildtime blocker against an installed # package that should cause it to be uninstalled. Note that with # soft blockers, the blocking packages are allowed to temporarily @@ -386,7 +386,7 @@ class MergeOrderTestCase(TestCase): ResolverPlaygroundTestCase( ["app-misc/blocker-buildtime-unbuilt-a"], success = True, - mergelist = ["app-misc/blocker-buildtime-unbuilt-a-1", "app-misc/installed-blocker-a-1", "!app-misc/installed-blocker-a"]), + mergelist = ["app-misc/blocker-buildtime-unbuilt-a-1", "[uninstall]app-misc/installed-blocker-a-1", "!app-misc/installed-blocker-a"]), # We have a hard buildtime blocker against an installed # package that will not resolve automatically (unless # the option requested in bug 250286 is implemented). @@ -409,7 +409,7 @@ class MergeOrderTestCase(TestCase): ResolverPlaygroundTestCase( ["media-video/libav"], success=True, - mergelist = ['media-video/libav-0.7_pre20110327', 'media-video/ffmpeg-0.7_rc1', '!media-video/ffmpeg']), + mergelist = ['media-video/libav-0.7_pre20110327', '[uninstall]media-video/ffmpeg-0.7_rc1', '!media-video/ffmpeg']), # Test that OS_HEADERS_PACKAGE_ATOM and LIBC_PACKAGE_ATOM # are merged asap, in order to account for implicit # dependencies. See bug #303567. Optimally, satisfied deps -- 2.26.2