summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/Package.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 47a435f21..13119d229 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -67,6 +67,11 @@ class Package(Task):
self._validate_deps()
self.masks = self._masks()
self.visible = self._visible(self.masks)
+ if self.operation is None:
+ if self.onlydeps or self.installed:
+ self.operation = "nomerge"
+ else:
+ self.operation = "merge"
def _validate_deps(self):
"""
@@ -267,11 +272,6 @@ class Package(Task):
msgs.append(msg)
def __str__(self):
- if self.operation is None:
- self.operation = "merge"
- if self.onlydeps or self.installed:
- self.operation = "nomerge"
-
if self.operation == "merge":
if self.type_name == "binary":
cpv_color = "PKG_BINARY_MERGE"
@@ -406,10 +406,6 @@ class Package(Task):
def _get_hash_key(self):
hash_key = getattr(self, "_hash_key", None)
if hash_key is None:
- if self.operation is None:
- self.operation = "merge"
- if self.onlydeps or self.installed:
- self.operation = "nomerge"
self._hash_key = \
(self.type_name, self.root, self.cpv, self.operation)
return self._hash_key