summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/DepPrioritySatisfiedRange.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-21 17:46:11 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-21 17:46:11 -0700
commitd4bf8dc02293cfc81c19f39b12b5e180a5e12645 (patch)
treedbbe4dff14203d91f51ebc58168d187398852466 /pym/_emerge/DepPrioritySatisfiedRange.py
parent5933561be0ed3a6d46ba9608edff79bbeb8cd7f1 (diff)
downloadportage-d4bf8dc02293cfc81c19f39b12b5e180a5e12645.tar.gz
portage-d4bf8dc02293cfc81c19f39b12b5e180a5e12645.tar.bz2
portage-d4bf8dc02293cfc81c19f39b12b5e180a5e12645.zip
DepPriority: remove "rebuild" attribute
Since the addition of DepPriorityNormalRange and DepPrioritySatisfiedRange in commit bd369956b2a2fbc019a655a372628998499156c0, which solves most cases of bug 199856, the Depriority.rebuild attribute doesn't appear to make any difference. The edges that this attribute differentiates are already naturally differentiated by the fact that the child node of a satisfied buildtime dependency that's not being rebuilt will naturally be identified as a leaf node earlier and removed from the graph, thereby eliminating the edge before there's an opportunity to compare it with a higher priority rebuild edge. The addition of the "optional" attribute (in commit 15476805a156acd11fdaaa19212691e8ee09b309) also plays a role here, since it converts some satisfied buildtime edges to optional edges, thereby reducing their priority.
Diffstat (limited to 'pym/_emerge/DepPrioritySatisfiedRange.py')
-rw-r--r--pym/_emerge/DepPrioritySatisfiedRange.py31
1 files changed, 8 insertions, 23 deletions
diff --git a/pym/_emerge/DepPrioritySatisfiedRange.py b/pym/_emerge/DepPrioritySatisfiedRange.py
index 7fa2f0977..edb29df96 100644
--- a/pym/_emerge/DepPrioritySatisfiedRange.py
+++ b/pym/_emerge/DepPrioritySatisfiedRange.py
@@ -7,18 +7,17 @@ class DepPrioritySatisfiedRange(object):
DepPriority Index Category
not satisfied and buildtime HARD
- not satisfied and runtime 7 MEDIUM
- not satisfied and runtime_post 6 MEDIUM_SOFT
- satisfied and buildtime and rebuild 5 SOFT
+ not satisfied and runtime 6 MEDIUM
+ not satisfied and runtime_post 5 MEDIUM_SOFT
satisfied and buildtime 4 SOFT
satisfied and runtime 3 SOFT
satisfied and runtime_post 2 SOFT
optional 1 SOFT
(none of the above) 0 NONE
"""
- MEDIUM = 7
- MEDIUM_SOFT = 6
- SOFT = 5
+ MEDIUM = 6
+ MEDIUM_SOFT = 5
+ SOFT = 4
NONE = 0
@classmethod
@@ -51,21 +50,8 @@ class DepPrioritySatisfiedRange(object):
def _ignore_satisfied_buildtime(cls, priority):
if priority.__class__ is not DepPriority:
return False
- if priority.optional:
- return True
- if not priority.satisfied:
- return False
- if priority.buildtime:
- return not priority.rebuild
- return True
-
- @classmethod
- def _ignore_satisfied_buildtime_rebuild(cls, priority):
- if priority.__class__ is not DepPriority:
- return False
- if priority.optional:
- return True
- return bool(priority.satisfied)
+ return bool(priority.optional or \
+ priority.satisfied)
@classmethod
def _ignore_runtime_post(cls, priority):
@@ -85,7 +71,7 @@ class DepPrioritySatisfiedRange(object):
ignore_medium = _ignore_runtime
ignore_medium_soft = _ignore_runtime_post
- ignore_soft = _ignore_satisfied_buildtime_rebuild
+ ignore_soft = _ignore_satisfied_buildtime
DepPrioritySatisfiedRange.ignore_priority = (
@@ -94,7 +80,6 @@ DepPrioritySatisfiedRange.ignore_priority = (
DepPrioritySatisfiedRange._ignore_satisfied_runtime_post,
DepPrioritySatisfiedRange._ignore_satisfied_runtime,
DepPrioritySatisfiedRange._ignore_satisfied_buildtime,
- DepPrioritySatisfiedRange._ignore_satisfied_buildtime_rebuild,
DepPrioritySatisfiedRange._ignore_runtime_post,
DepPrioritySatisfiedRange._ignore_runtime
)