summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-08 19:04:29 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-08 19:04:29 +0000
commit2e6fc4b71d7d5dd40c344c0e4c24680c9c8a1eee (patch)
tree22cf70f3e62d8999d95274dca38bd4a08480b102 /bin
parent9250cfa11753d6e3bd95b897aed82c42d037a3ee (diff)
downloadportage-2e6fc4b71d7d5dd40c344c0e4c24680c9c8a1eee.tar.gz
portage-2e6fc4b71d7d5dd40c344c0e4c24680c9c8a1eee.tar.bz2
portage-2e6fc4b71d7d5dd40c344c0e4c24680c9c8a1eee.zip
Remove unnecessary BlockerDB and BlockerCache _installed_pkgs attributes.
(trunk r10241) svn path=/main/branches/2.1.2/; revision=10242
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/emerge b/bin/emerge
index ad12c62b7..1cf44d2ed 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1525,7 +1525,6 @@ class BlockerCache(DictMixin):
def __init__(self, myroot, vardb):
self._vardb = vardb
- self._installed_pkgs = set(vardb.cpv_all())
self._virtuals = vardb.settings.getvirtuals()
self._cache_filename = os.path.join(myroot,
portage.CACHE_PATH.lstrip(os.path.sep), "vdb_blockers.pickle")
@@ -1671,7 +1670,6 @@ class BlockerDB(object):
"porttree" : self._vartree,
"vartree" : self._vartree,
}}
- self._installed_pkgs = None
def findInstalledBlockers(self, new_pkg):
blocker_cache = self._blocker_cache
@@ -1683,9 +1681,9 @@ class BlockerDB(object):
FakeVartree(self._vartree,
self._portdb, Package.metadata_keys, {})
vardb = fake_vartree.dbapi
- self._installed_pkgs = list(vardb)
+ installed_pkgs = list(vardb)
- for inst_pkg in self._installed_pkgs:
+ for inst_pkg in installed_pkgs:
stale_cache.discard(inst_pkg.cpv)
cached_blockers = blocker_cache.get(inst_pkg.cpv)
if cached_blockers is not None and \
@@ -1724,7 +1722,7 @@ class BlockerDB(object):
blocker_parents = digraph()
blocker_atoms = []
- for pkg in self._installed_pkgs:
+ for pkg in installed_pkgs:
for blocker_atom in self._blocker_cache[pkg.cpv].atoms:
blocker_atom = blocker_atom[1:]
blocker_atoms.append(blocker_atom)
@@ -1753,7 +1751,7 @@ class BlockerDB(object):
blocker_atoms = [atom[1:] for atom in atoms \
if atom.startswith("!")]
blocker_atoms = InternalPackageSet(initial_atoms=blocker_atoms)
- for inst_pkg in self._installed_pkgs:
+ for inst_pkg in installed_pkgs:
try:
blocker_atoms.iterAtomsForPackage(inst_pkg).next()
except (portage_exception.InvalidDependString, StopIteration):