aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-06-15 23:03:59 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-06-15 23:03:59 (GMT)
commitb363b5342ac918f06e8752e702e68363d1388cdb (patch)
treea6fd01cce7b0bafd66ddaed7d5f48ed9ea66c4e5
parenttest_autounmask: add case for bug #420847 (diff)
downloadportage-b363b5342ac918f06e8752e702e68363d1388cdb.zip
portage-b363b5342ac918f06e8752e702e68363d1388cdb.tar.gz
portage-b363b5342ac918f06e8752e702e68363d1388cdb.tar.bz2
Add USE + license autounmask for bug #420847.
-rw-r--r--pym/_emerge/depgraph.py9
-rw-r--r--pym/portage/tests/resolver/test_autounmask.py12
2 files changed, 13 insertions, 8 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 2e98be8..5eece98 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -3522,7 +3522,8 @@ class depgraph(object):
"""
Iterate over the different allowed things to unmask.
- 1. USE
+ 0. USE
+ 1. USE + license
2. USE + ~arch + license
3. USE + ~arch + license + missing keywords
4. USE + ~arch + license + masks
@@ -3541,8 +3542,12 @@ class depgraph(object):
autounmask_level = self._AutounmaskLevel()
autounmask_level.allow_use_changes = True
+ yield autounmask_level
- for only_use_changes in (True, False):
+ autounmask_level.allow_license_changes = True
+ yield autounmask_level
+
+ for only_use_changes in (False,):
autounmask_level.allow_unstable_keywords = (not only_use_changes)
autounmask_level.allow_license_changes = (not only_use_changes)
diff --git a/pym/portage/tests/resolver/test_autounmask.py b/pym/portage/tests/resolver/test_autounmask.py
index c75a174..84182ba 100644
--- a/pym/portage/tests/resolver/test_autounmask.py
+++ b/pym/portage/tests/resolver/test_autounmask.py
@@ -321,12 +321,12 @@ class AutounmaskTestCase(TestCase):
license_changes = { "dev-libs/D-1": set(["TEST"]), "dev-libs/E-1": set(["TEST"]), "dev-libs/E-2": set(["TEST"]), "dev-libs/F-1": set(["TEST"]) }),
#Test license only for bug #420847
- #ResolverPlaygroundTestCase(
- #["dev-java/sun-jdk"],
- #options = {"--autounmask": True},
- #success = False,
- #mergelist = ["dev-java/sun-jdk-1.6.0.31"],
- #license_changes = { "dev-java/sun-jdk-1.6.0.31": set(["TEST"]) }),
+ ResolverPlaygroundTestCase(
+ ["dev-java/sun-jdk"],
+ options = {"--autounmask": True},
+ success = False,
+ mergelist = ["dev-java/sun-jdk-1.6.0.31"],
+ license_changes = { "dev-java/sun-jdk-1.6.0.31": set(["TEST"]) }),
)
playground = ResolverPlayground(ebuilds=ebuilds)