1 |
Author: zmedico |
2 |
Date: 2009-05-03 07:25:19 +0000 (Sun, 03 May 2009) |
3 |
New Revision: 13599 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/_emerge/__init__.py |
7 |
Log: |
8 |
Simplify DepPriority.__int__() and make it consistent with __str__(). |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/_emerge/__init__.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/_emerge/__init__.py 2009-05-02 22:34:09 UTC (rev 13598) |
14 |
+++ main/trunk/pym/_emerge/__init__.py 2009-05-03 07:25:19 UTC (rev 13599) |
15 |
@@ -945,35 +945,23 @@ |
16 |
|
17 |
Attributes Hardness |
18 |
|
19 |
- not satisfied and buildtime 8 |
20 |
- not satisfied and runtime 7 |
21 |
- not satisfied and runtime_post 6 |
22 |
- satisfied and buildtime and rebuild 5 |
23 |
- satisfied and buildtime 4 |
24 |
- satisfied and runtime 3 |
25 |
- satisfied and runtime_post 2 |
26 |
- optional 1 |
27 |
- (none of the above) 0 |
28 |
+ buildtime 0 |
29 |
+ runtime -1 |
30 |
+ runtime_post -2 |
31 |
+ optional -3 |
32 |
+ (none of the above) -4 |
33 |
|
34 |
""" |
35 |
- if not self.satisfied: |
36 |
- if self.buildtime: |
37 |
- return 8 |
38 |
- if self.runtime: |
39 |
- return 7 |
40 |
- if self.runtime_post: |
41 |
- return 6 |
42 |
+ |
43 |
if self.buildtime: |
44 |
- if self.rebuild: |
45 |
- return 5 |
46 |
- return 4 |
47 |
+ return 0 |
48 |
if self.runtime: |
49 |
- return 3 |
50 |
+ return -1 |
51 |
if self.runtime_post: |
52 |
- return 2 |
53 |
+ return -2 |
54 |
if self.optional: |
55 |
- return 1 |
56 |
- return 0 |
57 |
+ return -3 |
58 |
+ return -4 |
59 |
|
60 |
def __str__(self): |
61 |
if self.optional: |