blob: 8ad0cd1ea94e529fc941b9d57f5650308326a90e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
from _emerge.AbstractDepPriority import AbstractDepPriority
class UnmergeDepPriority(AbstractDepPriority):
__slots__ = ("optional", "satisfied",)
"""
Combination of properties Priority Category
runtime 0 HARD
runtime_post -1 HARD
buildtime -2 SOFT
(none of the above) -2 SOFT
"""
MAX = 0
SOFT = -2
MIN = -2
def __int__(self):
if self.runtime:
return 0
if self.runtime_post:
return -1
if self.buildtime:
return -2
return -2
def __str__(self):
myvalue = self.__int__()
if myvalue > self.SOFT:
return "hard"
return "soft"
|