summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/UnmergeDepPriority.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge/UnmergeDepPriority.py')
-rw-r--r--pym/_emerge/UnmergeDepPriority.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/pym/_emerge/UnmergeDepPriority.py b/pym/_emerge/UnmergeDepPriority.py
new file mode 100644
index 000000000..8ad0cd1ea
--- /dev/null
+++ b/pym/_emerge/UnmergeDepPriority.py
@@ -0,0 +1,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"
+