summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-02 13:29:42 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-02 13:29:42 -0800
commit3e343a2e66053dc6375ba7ea04c6966afef995f7 (patch)
tree4371395fecf5fdc0ba41989be040997966186895 /pym/portage
parent6709704ffe68937e35d6e945043b5da50b5941c2 (diff)
downloadportage-3e343a2e66053dc6375ba7ea04c6966afef995f7.tar.gz
portage-3e343a2e66053dc6375ba7ea04c6966afef995f7.tar.bz2
portage-3e343a2e66053dc6375ba7ea04c6966afef995f7.zip
Make || choices independent of REQUIRED_USE.
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/tests/resolver/test_required_use.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/pym/portage/tests/resolver/test_required_use.py b/pym/portage/tests/resolver/test_required_use.py
index 90ccb3da0..c8810faef 100644
--- a/pym/portage/tests/resolver/test_required_use.py
+++ b/pym/portage/tests/resolver/test_required_use.py
@@ -1,4 +1,4 @@
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
@@ -88,3 +88,27 @@ class RequiredUSETestCase(TestCase):
self.assertEqual(test_case.test_success, True, test_case.fail_msg)
finally:
playground.cleanup()
+
+ def testRequiredUseOrDeps(self):
+
+ ebuilds = {
+ "dev-libs/A-1": { "IUSE": "+x +y", "REQUIRED_USE": "^^ ( x y )", "EAPI": "4" },
+ "dev-libs/B-1": { "IUSE": "+x +y", "REQUIRED_USE": "", "EAPI": "4" },
+ "app-misc/p-1": { "RDEPEND": "|| ( =dev-libs/A-1 =dev-libs/B-1 )" },
+ }
+
+ test_cases = (
+ # This should fail and show a REQUIRED_USE error for
+ # dev-libs/A-1, since this choice it preferred.
+ ResolverPlaygroundTestCase(
+ ["=app-misc/p-1"],
+ success = False),
+ )
+
+ playground = ResolverPlayground(ebuilds=ebuilds)
+ 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()