summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/resolver
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2011-09-19 07:32:08 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-19 07:32:08 -0700
commitd36be695ea48025ba195deb82f51846aee2254ec (patch)
treeeda736004b7c05c5c909e7b7237689bfdf54e08a /pym/portage/tests/resolver
parent7e956a6ec65b9b48a9fca3e928e7c7b56fd066b6 (diff)
downloadportage-d36be695ea48025ba195deb82f51846aee2254ec.tar.gz
portage-d36be695ea48025ba195deb82f51846aee2254ec.tar.bz2
portage-d36be695ea48025ba195deb82f51846aee2254ec.zip
autounmask: Add --autounmask-keep-masks option
Disables creation of p.unmask entries to allow users to insist on their masks and hope for another conflict resolution (i.e. missed update). This fixes bug 372485.
Diffstat (limited to 'pym/portage/tests/resolver')
-rw-r--r--pym/portage/tests/resolver/test_autounmask.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/pym/portage/tests/resolver/test_autounmask.py b/pym/portage/tests/resolver/test_autounmask.py
index ff13789dc..3da1c2510 100644
--- a/pym/portage/tests/resolver/test_autounmask.py
+++ b/pym/portage/tests/resolver/test_autounmask.py
@@ -388,3 +388,42 @@ class AutounmaskTestCase(TestCase):
self.assertEqual(test_case.test_success, True, test_case.fail_msg)
finally:
playground.cleanup()
+
+
+ def testAutounmaskKeepMasks(self):
+
+ ebuilds = {
+ "app-text/A-1": {},
+ }
+
+ test_cases = (
+ #Test mask and keyword changes.
+ ResolverPlaygroundTestCase(
+ ["app-text/A"],
+ options = {"--autounmask": True,
+ "--autounmask-keep-masks": "y"},
+ success = False),
+ ResolverPlaygroundTestCase(
+ ["app-text/A"],
+ options = {"--autounmask": True,
+ "--autounmask-keep-masks": "n"},
+ success = False,
+ mergelist = ["app-text/A-1"],
+ needed_p_mask_changes = ["app-text/A-1"]),
+ )
+
+ profile = {
+ "package.mask":
+ (
+ "app-text/A",
+ ),
+ }
+
+ playground = ResolverPlayground(ebuilds=ebuilds, profile=profile)
+
+ try:
+ for test_case in test_cases:
+ playground.run_TestCase(test_case)
+ self.assertEqual(test_case.test_success, True, test_case.fail_msg)
+ finally:
+ playground.cleanup()