Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13605 - main/branches/2.1.6/pym/_emerge
Date: Sun, 03 May 2009 20:28:43
Message-Id: E1M0iIj-0007ow-Qr@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-05-03 20:28:40 +0000 (Sun, 03 May 2009)
3 New Revision: 13605
4
5 Modified:
6 main/branches/2.1.6/pym/_emerge/__init__.py
7 Log:
8 Simplify DepPriority.__int__() and make it consistent with __str__().
9 (trunk r13599)
10
11 Modified: main/branches/2.1.6/pym/_emerge/__init__.py
12 ===================================================================
13 --- main/branches/2.1.6/pym/_emerge/__init__.py 2009-05-03 20:28:16 UTC (rev 13604)
14 +++ main/branches/2.1.6/pym/_emerge/__init__.py 2009-05-03 20:28:40 UTC (rev 13605)
15 @@ -926,35 +926,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: