diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-02 19:09:13 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-02 19:09:13 +0000 |
commit | 927e5ec52d0e3849460e406e64b0b4c563f95dbf (patch) | |
tree | 74469574a57c2e981dd6120f25c9d8c7951ab308 | |
parent | b00584e75bf1f95617aaac22cf5bc9fed11ee5cd (diff) | |
download | portage-927e5ec52d0e3849460e406e64b0b4c563f95dbf.tar.gz portage-927e5ec52d0e3849460e406e64b0b4c563f95dbf.tar.bz2 portage-927e5ec52d0e3849460e406e64b0b4c563f95dbf.zip |
Use Package.cp instead of dep_getkey(cpv).
svn path=/main/trunk/; revision=9680
-rw-r--r-- | pym/_emerge/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 55e35330c..a33929d56 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3631,6 +3631,8 @@ class depgraph(object): mydbapi.aux_get(pkg_key, self._mydbapi_keys))) ebuild_path = None repo_name = metadata["repository"] + built = pkg_type != "ebuild" + installed = pkg_type == "installed" if pkg_type == "ebuild": ebuild_path = portdb.findname(pkg_key) if not ebuild_path: # shouldn't happen @@ -3641,6 +3643,9 @@ class depgraph(object): metadata["USE"] = pkgsettings["PORTAGE_USE"] else: repo_path_real = portdb.getRepositoryPath(repo_name) + pkg_node = Package(type_name=pkg_type, root=myroot, + cpv=pkg_key, built=built, installed=installed, + metadata=metadata) pkg_use = metadata["USE"].split() try: restrict = flatten(use_reduce(paren_reduce( @@ -4785,8 +4790,7 @@ class MergeTask(object): "--fetch-all-uri" not in self.myopts: # Figure out if we need a restart. - if myroot == "/" and \ - portage.dep_getkey(pkg_key) == "sys-apps/portage": + if myroot == "/" and pkg_node.cp == "sys-apps/portage": if len(mymergelist) > mergecount: emergelog(xterm_titles, " ::: completed emerge ("+ \ |