1 |
commit: b363b5342ac918f06e8752e702e68363d1388cdb |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 15 23:03:59 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 15 23:03:59 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b363b534 |
7 |
|
8 |
Add USE + license autounmask for bug #420847. |
9 |
|
10 |
--- |
11 |
pym/_emerge/depgraph.py | 9 +++++++-- |
12 |
pym/portage/tests/resolver/test_autounmask.py | 12 ++++++------ |
13 |
2 files changed, 13 insertions(+), 8 deletions(-) |
14 |
|
15 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
16 |
index 2e98be8..5eece98 100644 |
17 |
--- a/pym/_emerge/depgraph.py |
18 |
+++ b/pym/_emerge/depgraph.py |
19 |
@@ -3522,7 +3522,8 @@ class depgraph(object): |
20 |
""" |
21 |
Iterate over the different allowed things to unmask. |
22 |
|
23 |
- 1. USE |
24 |
+ 0. USE |
25 |
+ 1. USE + license |
26 |
2. USE + ~arch + license |
27 |
3. USE + ~arch + license + missing keywords |
28 |
4. USE + ~arch + license + masks |
29 |
@@ -3541,8 +3542,12 @@ class depgraph(object): |
30 |
autounmask_level = self._AutounmaskLevel() |
31 |
|
32 |
autounmask_level.allow_use_changes = True |
33 |
+ yield autounmask_level |
34 |
|
35 |
- for only_use_changes in (True, False): |
36 |
+ autounmask_level.allow_license_changes = True |
37 |
+ yield autounmask_level |
38 |
+ |
39 |
+ for only_use_changes in (False,): |
40 |
|
41 |
autounmask_level.allow_unstable_keywords = (not only_use_changes) |
42 |
autounmask_level.allow_license_changes = (not only_use_changes) |
43 |
|
44 |
diff --git a/pym/portage/tests/resolver/test_autounmask.py b/pym/portage/tests/resolver/test_autounmask.py |
45 |
index c75a174..84182ba 100644 |
46 |
--- a/pym/portage/tests/resolver/test_autounmask.py |
47 |
+++ b/pym/portage/tests/resolver/test_autounmask.py |
48 |
@@ -321,12 +321,12 @@ class AutounmaskTestCase(TestCase): |
49 |
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"]) }), |
50 |
|
51 |
#Test license only for bug #420847 |
52 |
- #ResolverPlaygroundTestCase( |
53 |
- #["dev-java/sun-jdk"], |
54 |
- #options = {"--autounmask": True}, |
55 |
- #success = False, |
56 |
- #mergelist = ["dev-java/sun-jdk-1.6.0.31"], |
57 |
- #license_changes = { "dev-java/sun-jdk-1.6.0.31": set(["TEST"]) }), |
58 |
+ ResolverPlaygroundTestCase( |
59 |
+ ["dev-java/sun-jdk"], |
60 |
+ options = {"--autounmask": True}, |
61 |
+ success = False, |
62 |
+ mergelist = ["dev-java/sun-jdk-1.6.0.31"], |
63 |
+ license_changes = { "dev-java/sun-jdk-1.6.0.31": set(["TEST"]) }), |
64 |
) |
65 |
|
66 |
playground = ResolverPlayground(ebuilds=ebuilds) |