From: Zac Medico Date: Fri, 15 Jun 2012 23:03:59 +0000 (-0700) Subject: Add USE + license autounmask for bug #420847. X-Git-Tag: v2.2.0_alpha111~44 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b363b5342ac918f06e8752e702e68363d1388cdb;p=portage.git Add USE + license autounmask for bug #420847. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 2e98be837..5eece9876 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 c75a17401..84182ba6a 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)