From: Zac Medico Date: Wed, 2 Apr 2008 19:29:27 +0000 (-0000) Subject: Use Package.cp instead of dep_getkey(cpv). (trunk r9679:9681) X-Git-Tag: v2.1.5~259 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d72bfb199cce79ba59cff8d5f88f39d6383b633d;p=portage.git Use Package.cp instead of dep_getkey(cpv). (trunk r9679:9681) svn path=/main/branches/2.1.2/; revision=9682 --- diff --git a/bin/emerge b/bin/emerge index 672c37ff8..baba8283e 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3339,6 +3339,8 @@ class depgraph: 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 @@ -3349,6 +3351,9 @@ class depgraph: 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: @@ -4218,8 +4223,10 @@ class MergeTask(object): mergecount=0 for x in mymergelist: - mergecount+=1 pkg_type = x[0] + if pkg_type == "blocks": + continue + mergecount+=1 myroot=x[1] pkg_key = x[2] pkgindex=2 @@ -4243,6 +4250,11 @@ class MergeTask(object): raise AssertionError("Package type: '%s'" % pkg_type) metadata.update(izip(metadata_keys, mydbapi.aux_get(pkg_key, metadata_keys))) + built = pkg_type != "ebuild" + installed = pkg_type == "installed" + pkg = Package(type_name=pkg_type, root=myroot, + cpv=pkg_key, built=built, installed=installed, + metadata=metadata) if x[0]=="blocks": pkgindex=3 y = portdb.findname(pkg_key) @@ -4470,8 +4482,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.cp == "sys-apps/portage": if "livecvsportage" not in self.settings.features: if len(mymergelist) > mergecount: emergelog(xterm_titles,