* [gentoo-commits] portage r9794 - main/trunk/pym/_emerge
@ 2008-04-10 6:34 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-04-10 6:34 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-04-10 06:34:52 +0000 (Thu, 10 Apr 2008)
New Revision: 9794
Modified:
main/trunk/pym/_emerge/__init__.py
Log:
Use cached Package instances in depgraph.display().
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2008-04-10 06:15:24 UTC (rev 9793)
+++ main/trunk/pym/_emerge/__init__.py 2008-04-10 06:34:52 UTC (rev 9794)
@@ -3692,7 +3692,6 @@
for mylist_index in xrange(len(mylist)):
x, depth, ordered = mylist[mylist_index]
- pkg_node = tuple(x)
pkg_type = x[0]
myroot = x[1]
pkg_key = x[2]
@@ -3724,17 +3723,16 @@
addl += bad(" (is blocking %s)") % block_parents
blockers.append(addl)
else:
+ pkg = self._pkg_cache[tuple(x)]
+ metadata = pkg.metadata
pkg_status = x[3]
pkg_merge = ordered and pkg_status != "nomerge"
- if pkg_node in self._slot_collision_nodes or \
- (pkg_status == "nomerge" and pkg_type != "installed"):
+ if pkg in self._slot_collision_nodes or pkg.onlydeps:
# The metadata isn't cached due to a slot collision or
# --onlydeps.
mydbapi = self.trees[myroot][self.pkg_tree_map[pkg_type]].dbapi
else:
mydbapi = self.mydbapi[myroot] # contains cached metadata
- metadata = dict(izip(self._mydbapi_keys,
- mydbapi.aux_get(pkg_key, self._mydbapi_keys)))
ebuild_path = None
repo_name = metadata["repository"]
built = pkg_type != "ebuild"
@@ -3745,13 +3743,8 @@
raise portage.exception.PackageNotFound(pkg_key)
repo_path_real = os.path.dirname(os.path.dirname(
os.path.dirname(ebuild_path)))
- pkgsettings.setcpv(pkg_key, mydb=mydbapi)
- 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(
@@ -3901,7 +3894,7 @@
# Prevent USE_EXPAND_HIDDEN flags from being hidden if they
# are the only thing that triggered reinstallation.
reinst_flags_map = {}
- reinstall_for_flags = self._reinstall_nodes.get(pkg_node)
+ reinstall_for_flags = self._reinstall_nodes.get(pkg)
reinst_expand_map = None
if reinstall_for_flags:
reinst_flags_map = map_to_use_expand(
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-10 6:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 6:34 [gentoo-commits] portage r9794 - main/trunk/pym/_emerge Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox