Add USE + license autounmask for bug #420847.
authorZac Medico <zmedico@gentoo.org>
Fri, 15 Jun 2012 23:03:59 +0000 (16:03 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 15 Jun 2012 23:03:59 +0000 (16:03 -0700)
pym/_emerge/depgraph.py
pym/portage/tests/resolver/test_autounmask.py

index 2e98be837322adaf202a0f87e9ff036023999fc5..5eece9876babe8f24861ef16906f021c1e18058f 100644 (file)
@@ -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)
index c75a17401bb5a6374b64475e5a4ce30f4d33813b..84182ba6ae4eeee9e7cb49519f849030382ddfb3 100644 (file)
@@ -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)