summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-27 14:43:18 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-27 14:43:18 -0700
commitaa5a8e0d18f5c44b672cd02b615e8f124173e3e8 (patch)
tree486b260dac9501f9eb4d20c62d7e0719fc3ebaca
parent59f50a0bf9bdbb3aab4eee097e12bf32eeb12274 (diff)
downloadportage-aa5a8e0d18f5c44b672cd02b615e8f124173e3e8.tar.gz
portage-aa5a8e0d18f5c44b672cd02b615e8f124173e3e8.tar.bz2
portage-aa5a8e0d18f5c44b672cd02b615e8f124173e3e8.zip
Omit repo from mtimedb resume mergelist entries since the format
is intended to be frozen.
-rw-r--r--pym/_emerge/Package.py10
-rw-r--r--pym/_emerge/depgraph.py12
2 files changed, 18 insertions, 4 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index ba7fa42f8..c54ece186 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -386,6 +386,16 @@ class Package(Task):
(self.type_name, self.root, self.cpv, self.operation, self.metadata.get('repository', None))
return self._hash_key
+ def __len__(self):
+ return 4
+
+ def __iter__(self):
+ """
+ This is used to generate mtimedb resume mergelist entries, so we
+ limit it to 4 items for backward compatibility.
+ """
+ return iter(self._get_hash_key()[:4])
+
def __lt__(self, other):
if other.cp != self.cp:
return False
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index a8caf1296..7c4e30aec 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -4909,7 +4909,11 @@ class depgraph(object):
portdb = self._frozen_config.trees[self._frozen_config.target_root]["porttree"].dbapi
added_favorites = set()
for x in self._dynamic_config._set_nodes:
- pkg_type, root, pkg_key, pkg_status, pkg_repo = x
+ pkg_type = x.type_name
+ root = x.root
+ pkg_key = x.cpv
+ pkg_status = x.operation
+ pkg_repo = x.repo
if pkg_status != "nomerge":
continue
@@ -4969,16 +4973,16 @@ class depgraph(object):
serialized_tasks = []
masked_tasks = []
for x in mergelist:
- if not (isinstance(x, list) and len(x) == 5):
+ if not (isinstance(x, list) and len(x) == 4):
continue
- pkg_type, myroot, pkg_key, action, pkg_repo = x
+ pkg_type, myroot, pkg_key, action = x
if pkg_type not in self.pkg_tree_map:
continue
if action != "merge":
continue
root_config = self._frozen_config.roots[myroot]
try:
- pkg = self._pkg(pkg_key, pkg_type, root_config, myrepo=pkg_repo)
+ pkg = self._pkg(pkg_key, pkg_type, root_config)
except portage.exception.PackageNotFound:
# It does no exist or it is corrupt.
if skip_missing: