summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-02 16:02:09 -0800
committerZac Medico <zmedico@gentoo.org>2011-01-02 16:12:58 -0800
commitd2bb9b3e38d1729d54434ebbe0ac8630fd119cbf (patch)
treefdd9df47772635c862f10a14212571bdbd8ed168
parenta0ec7b40de13c8cc46802a11992664ce47ddfd96 (diff)
downloadportage-d2bb9b3e38d1729d54434ebbe0ac8630fd119cbf.tar.gz
portage-d2bb9b3e38d1729d54434ebbe0ac8630fd119cbf.tar.bz2
portage-d2bb9b3e38d1729d54434ebbe0ac8630fd119cbf.zip
add depclean test for bug #350285
-rw-r--r--pym/portage/tests/resolver/test_depclean.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/pym/portage/tests/resolver/test_depclean.py b/pym/portage/tests/resolver/test_depclean.py
index 5810d22ba..18e0b87e4 100644
--- a/pym/portage/tests/resolver/test_depclean.py
+++ b/pym/portage/tests/resolver/test_depclean.py
@@ -118,6 +118,44 @@ class DepcleanWithInstalledMaskedTestCase(TestCase):
finally:
playground.cleanup()
+class DepcleanInstalledKeywordMaskedSlotTestCase(TestCase):
+
+ def testDepcleanInstalledKeywordMaskedSlot(self):
+ """
+ Verify that depclean removes newer slot
+ masked by KEYWORDS (see bug #350285).
+ """
+ ebuilds = {
+ "dev-libs/A-1": { "RDEPEND": "|| ( =dev-libs/B-2.7* =dev-libs/B-2.6* )" },
+ "dev-libs/B-2.6": { "SLOT":"2.6", "KEYWORDS": "x86" },
+ "dev-libs/B-2.7": { "SLOT":"2.7", "KEYWORDS": "~x86" },
+ }
+ installed = {
+ "dev-libs/A-1": { "EAPI" : "3", "RDEPEND": "|| ( dev-libs/B:2.7 dev-libs/B:2.6 )" },
+ "dev-libs/B-2.6": { "SLOT":"2.6", "KEYWORDS": "x86" },
+ "dev-libs/B-2.7": { "SLOT":"2.7", "KEYWORDS": "~x86" },
+ }
+
+ world = (
+ "dev-libs/A",
+ )
+
+ test_cases = (
+ ResolverPlaygroundTestCase(
+ [],
+ options = {"--depclean": True},
+ success = True,
+ cleanlist = ["dev-libs/B-2.7"]),
+ )
+
+ playground = ResolverPlayground(ebuilds=ebuilds, installed=installed, world=world)
+ 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()
+
class DepcleanWithExcludeTestCase(TestCase):
def testDepcleanWithExclude(self):