* [gentoo-commits] portage r11811 - main/branches/prefix/pym/portage/dbapi
@ 2008-11-05 18:29 Fabian Groffen (grobian)
0 siblings, 0 replies; only message in thread
From: Fabian Groffen (grobian) @ 2008-11-05 18:29 UTC (permalink / raw
To: gentoo-commits
Author: grobian
Date: 2008-11-05 18:29:48 +0000 (Wed, 05 Nov 2008)
New Revision: 11811
Modified:
main/branches/prefix/pym/portage/dbapi/vartree.py
Log:
Make some changes to make the LinkageMapMachO more compatible (codewise) to LinkageMap. It isn't necessary, since no patch lookups are done, as we have absolute paths as keys.
Modified: main/branches/prefix/pym/portage/dbapi/vartree.py
===================================================================
--- main/branches/prefix/pym/portage/dbapi/vartree.py 2008-11-05 18:08:52 UTC (rev 11810)
+++ main/branches/prefix/pym/portage/dbapi/vartree.py 2008-11-05 18:29:48 UTC (rev 11811)
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-__all__ = ["PreservedLibsRegistry", "LinkageMap",
+__all__ = ["PreservedLibsRegistry", "LinkageMap", "LinkageMapMachO",
"vardbapi", "vartree", "dblink"] + \
["write_contents", "tar_contents"]
@@ -639,7 +639,21 @@
self._libs = {}
self._obj_properties = {}
self._obj_key_cache = {}
+ self._path_key_cache = {}
+ def _clear_cache(self):
+ self._libs.clear()
+ self._obj_properties.clear()
+ self._obj_key_cache.clear()
+ self._path_key_cache.clear()
+
+ def _path_key(self, path):
+ key = self._path_key_cache.get(path)
+ if key is None:
+ key = self._ObjectKey(path, self._root)
+ self._path_key_cache[path] = key
+ return key
+
class _ObjectKey(object):
"""Helper class used as _obj_properties keys for objects."""
@@ -710,9 +724,11 @@
def rebuild(self, exclude_pkgs=None, include_file=None):
root = self._root
- libs = {}
- obj_key_cache = {}
- obj_properties = {}
+ self._clear_cache()
+ libs = self._libs
+ obj_key_cache = self._obj_key_cache
+ obj_properties = self._obj_properties
+
lines = []
for cpv in self._dbapi.cpv_all():
if exclude_pkgs is not None and cpv in exclude_pkgs:
@@ -772,10 +788,6 @@
obj_properties.setdefault(obj_key, \
(arch, needed, install_name, set()))[3].add(obj)
- self._libs = libs
- self._obj_properties = obj_properties
- self._obj_key_cache = obj_key_cache
-
def listBrokenBinaries(self, debug=False):
"""
Find binaries and their needed install_names, which have no providers.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-05 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-05 18:29 [gentoo-commits] portage r11811 - main/branches/prefix/pym/portage/dbapi Fabian Groffen (grobian)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox