diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-25 07:18:36 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-25 07:18:36 +0000 |
commit | fc611ccd003d8f3e4c8d0e75a62966acb6305de0 (patch) | |
tree | 4476fcb0be1801ae9b11ae12a757733c5e11e0e8 | |
parent | 077d96998e66a42e9def5b4bdd393f0751ecb573 (diff) | |
download | portage-fc611ccd003d8f3e4c8d0e75a62966acb6305de0.tar.gz portage-fc611ccd003d8f3e4c8d0e75a62966acb6305de0.tar.bz2 portage-fc611ccd003d8f3e4c8d0e75a62966acb6305de0.zip |
Remove the BlockerDB._blocker_cache attribute and just create new
instances on demand instead of taking space on the heap.
svn path=/main/trunk/; revision=10777
-rw-r--r-- | pym/_emerge/__init__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 9d0ca28f4..f267c5422 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1682,15 +1682,14 @@ class BlockerDB(object): self._root_config = root_config self._vartree = root_config.trees["vartree"] self._portdb = root_config.trees["porttree"].dbapi - self._blocker_cache = \ - BlockerCache(self._vartree.root, self._vartree.dbapi) + self._dep_check_trees = { self._vartree.root : { "porttree" : self._vartree, "vartree" : self._vartree, }} def findInstalledBlockers(self, new_pkg, acquire_lock=0): - blocker_cache = self._blocker_cache + blocker_cache = BlockerCache(self._vartree.root, self._vartree.dbapi) dep_keys = ["DEPEND", "RDEPEND", "PDEPEND"] dep_check_trees = self._dep_check_trees settings = self._vartree.settings @@ -1739,7 +1738,7 @@ class BlockerDB(object): blocker_parents = digraph() blocker_atoms = [] for pkg in installed_pkgs: - for blocker_atom in self._blocker_cache[pkg.cpv].atoms: + for blocker_atom in blocker_cache[pkg.cpv].atoms: blocker_atom = blocker_atom[1:] blocker_atoms.append(blocker_atom) blocker_parents.add(blocker_atom, pkg) |