summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-10 02:31:51 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-10 02:31:51 +0000
commitd4bd70aed22dfdc3551a6cce51f7230af15bdebc (patch)
treee01635683b33744d1d2495a3cf6e65db143d72f6 /pym/_emerge
parent0d963db9895d012e593f54307de6fa81e5dd80fb (diff)
downloadportage-d4bd70aed22dfdc3551a6cce51f7230af15bdebc.tar.gz
portage-d4bd70aed22dfdc3551a6cce51f7230af15bdebc.tar.bz2
portage-d4bd70aed22dfdc3551a6cce51f7230af15bdebc.zip
Inside calc_depclean(), use LinkageMap.findConsumers() for checking
intersection of files being removed with providers in the LinkageMap (a KeyError is raised when there is no intersection). svn path=/main/trunk/; revision=13968
Diffstat (limited to 'pym/_emerge')
-rw-r--r--pym/_emerge/actions.py26
1 files changed, 11 insertions, 15 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 4632c10f2..cd980231f 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -901,7 +901,6 @@ def calc_depclean(settings, trees, ldpath_mtimes,
# packages and any dependencies need to be added to the graph.
real_vardb = trees[myroot]["vartree"].dbapi
linkmap = real_vardb.linkmap
- liblist = linkmap.listLibraryObjects()
consumer_cache = {}
provider_cache = {}
soname_cache = {}
@@ -911,23 +910,20 @@ def calc_depclean(settings, trees, ldpath_mtimes,
for pkg in cleanlist:
pkg_dblink = real_vardb._dblink(pkg.cpv)
- provided_libs = set()
-
- for lib in liblist:
- if pkg_dblink.isowner(lib, myroot):
- provided_libs.add(lib)
-
- if not provided_libs:
- continue
-
consumers = {}
- for lib in provided_libs:
- lib_consumers = consumer_cache.get(lib)
+
+ for lib in pkg_dblink.getcontents():
+ lib = lib[len(myroot):]
+ lib_key = linkmap._obj_key(lib)
+ lib_consumers = consumer_cache.get(lib_key)
if lib_consumers is None:
- lib_consumers = linkmap.findConsumers(lib)
- consumer_cache[lib] = lib_consumers
+ try:
+ lib_consumers = linkmap.findConsumers(lib_key)
+ except KeyError:
+ continue
+ consumer_cache[lib_key] = lib_consumers
if lib_consumers:
- consumers[lib] = lib_consumers
+ consumers[lib_key] = lib_consumers
if not consumers:
continue