OLD | NEW |
1 # Copyright 1999-2009 Gentoo Foundation | 1 # Copyright 1999-2009 Gentoo Foundation |
2 # Distributed under the terms of the GNU General Public License v2 | 2 # Distributed under the terms of the GNU General Public License v2 |
3 | 3 |
4 from _emerge.DepPriority import DepPriority | 4 from _emerge.DepPriority import DepPriority |
5 class DepPriorityNormalRange(object): | 5 class DepPriorityNormalRange(object): |
6 """ | 6 """ |
7 DepPriority properties Index Category | 7 DepPriority properties Index Category |
8 | 8 |
9 buildtime HARD | 9 buildtime HARD |
10 runtime 3 MEDIUM | 10 runtime 3 MEDIUM |
(...skipping 15 matching lines...) Expand all Loading... |
26 @classmethod | 26 @classmethod |
27 def _ignore_runtime_post(cls, priority): | 27 def _ignore_runtime_post(cls, priority): |
28 if priority.__class__ is not DepPriority: | 28 if priority.__class__ is not DepPriority: |
29 return False | 29 return False |
30 return bool(priority.optional or priority.runtime_post) | 30 return bool(priority.optional or priority.runtime_post) |
31 | 31 |
32 @classmethod | 32 @classmethod |
33 def _ignore_runtime(cls, priority): | 33 def _ignore_runtime(cls, priority): |
34 if priority.__class__ is not DepPriority: | 34 if priority.__class__ is not DepPriority: |
35 return False | 35 return False |
36 » » return not priority.buildtime | 36 » » return bool(priority.optional or not priority.buildtime) |
37 | 37 |
38 ignore_medium = _ignore_runtime | 38 ignore_medium = _ignore_runtime |
39 ignore_medium_soft = _ignore_runtime_post | 39 ignore_medium_soft = _ignore_runtime_post |
40 ignore_soft = _ignore_optional | 40 ignore_soft = _ignore_optional |
41 | 41 |
42 DepPriorityNormalRange.ignore_priority = ( | 42 DepPriorityNormalRange.ignore_priority = ( |
43 None, | 43 None, |
44 DepPriorityNormalRange._ignore_optional, | 44 DepPriorityNormalRange._ignore_optional, |
45 DepPriorityNormalRange._ignore_runtime_post, | 45 DepPriorityNormalRange._ignore_runtime_post, |
46 DepPriorityNormalRange._ignore_runtime | 46 DepPriorityNormalRange._ignore_runtime |
47 ) | 47 ) |
OLD | NEW |