diff options
-rw-r--r-- | pym/_emerge/Package.py | 10 | ||||
-rw-r--r-- | pym/_emerge/depgraph.py | 12 |
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: |