1 |
commit: f363a020a74df08d46dd4fa8b43a5fab85034951 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Nov 9 18:13:17 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 9 18:13:17 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f363a020 |
7 |
|
8 |
Use get(REQUIRED_USE) for emphasis. |
9 |
|
10 |
None of these cases should raise KeyError, but use get(REQUIRED_USE) |
11 |
anyway to emphasize that care must be taken. |
12 |
|
13 |
--- |
14 |
pym/_emerge/depgraph.py | 6 +++--- |
15 |
1 files changed, 3 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
18 |
index 2296aa0..fda335f 100644 |
19 |
--- a/pym/_emerge/depgraph.py |
20 |
+++ b/pym/_emerge/depgraph.py |
21 |
@@ -1089,7 +1089,7 @@ class depgraph(object): |
22 |
# package selection, since we want to prompt the user |
23 |
# for USE adjustment rather than have REQUIRED_USE |
24 |
# affect package selection and || dep choices. |
25 |
- if not pkg.built and pkg.metadata["REQUIRED_USE"] and \ |
26 |
+ if not pkg.built and pkg.metadata.get("REQUIRED_USE") and \ |
27 |
eapi_has_required_use(pkg.metadata["EAPI"]): |
28 |
required_use_is_sat = check_required_use( |
29 |
pkg.metadata["REQUIRED_USE"], |
30 |
@@ -3011,7 +3011,7 @@ class depgraph(object): |
31 |
raise |
32 |
if not mreasons and \ |
33 |
not pkg.built and \ |
34 |
- pkg.metadata["REQUIRED_USE"] and \ |
35 |
+ pkg.metadata.get("REQUIRED_USE") and \ |
36 |
eapi_has_required_use(pkg.metadata["EAPI"]): |
37 |
if not check_required_use( |
38 |
pkg.metadata["REQUIRED_USE"], |
39 |
@@ -3692,7 +3692,7 @@ class depgraph(object): |
40 |
|
41 |
if new_changes != old_changes: |
42 |
#Don't do the change if it violates REQUIRED_USE. |
43 |
- required_use = pkg.metadata["REQUIRED_USE"] |
44 |
+ required_use = pkg.metadata.get("REQUIRED_USE") |
45 |
if required_use and check_required_use(required_use, old_use, pkg.iuse.is_valid_flag) and \ |
46 |
not check_required_use(required_use, new_use, pkg.iuse.is_valid_flag): |
47 |
return old_use |