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.AbstractDepPriority import AbstractDepPriority | 4 from _emerge.AbstractDepPriority import AbstractDepPriority |
5 class UnmergeDepPriority(AbstractDepPriority): | 5 class UnmergeDepPriority(AbstractDepPriority): |
6 » __slots__ = ("optional", "satisfied",) | 6 » __slots__ = ("ignored", "optional", "satisfied",) |
7 """ | 7 """ |
8 Combination of properties Priority Category | 8 Combination of properties Priority Category |
9 | 9 |
10 runtime 0 HARD | 10 runtime 0 HARD |
11 runtime_post -1 HARD | 11 runtime_post -1 HARD |
12 buildtime -2 SOFT | 12 buildtime -2 SOFT |
13 (none of the above) -2 SOFT | 13 (none of the above) -2 SOFT |
14 """ | 14 """ |
15 | 15 |
16 MAX = 0 | 16 MAX = 0 |
17 SOFT = -2 | 17 SOFT = -2 |
18 MIN = -2 | 18 MIN = -2 |
19 | 19 |
20 def __init__(self, **kwargs): | 20 def __init__(self, **kwargs): |
21 AbstractDepPriority.__init__(self, **kwargs) | 21 AbstractDepPriority.__init__(self, **kwargs) |
22 if self.buildtime: | 22 if self.buildtime: |
23 self.optional = True | 23 self.optional = True |
24 | 24 |
25 def __int__(self): | 25 def __int__(self): |
26 if self.runtime: | 26 if self.runtime: |
27 return 0 | 27 return 0 |
28 if self.runtime_post: | 28 if self.runtime_post: |
29 return -1 | 29 return -1 |
30 if self.buildtime: | 30 if self.buildtime: |
31 return -2 | 31 return -2 |
32 return -2 | 32 return -2 |
33 | 33 |
34 def __str__(self): | 34 def __str__(self): |
| 35 if self.ignored: |
| 36 return "ignored" |
35 myvalue = self.__int__() | 37 myvalue = self.__int__() |
36 if myvalue > self.SOFT: | 38 if myvalue > self.SOFT: |
37 return "hard" | 39 return "hard" |
38 return "soft" | 40 return "soft" |
39 | 41 |
OLD | NEW |