summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-09 02:03:32 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-09 02:03:32 +0000
commitb948556844dac554261d0a860979ecc14ad9f5e1 (patch)
tree4209cdd70d285d140ebcf2dfb64ea409961d2636
parent973a670685f5dde909c04cca5a01c7baac0c2049 (diff)
downloadportage-b948556844dac554261d0a860979ecc14ad9f5e1.tar.gz
portage-b948556844dac554261d0a860979ecc14ad9f5e1.tar.bz2
portage-b948556844dac554261d0a860979ecc14ad9f5e1.zip
Inside LinkageMap, use self._obj_key() whenever possible.
svn path=/main/trunk/; revision=11830
-rw-r--r--pym/portage/dbapi/vartree.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index c7bf8232d..8577467b7 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -403,10 +403,7 @@ class LinkageMap(object):
if obj in cache_self.cache:
return cache_self.cache[obj]
else:
- if obj in self._obj_key_cache:
- obj_key = self._obj_key_cache.get(obj)
- else:
- obj_key = self._ObjectKey(obj, self._root)
+ obj_key = self._obj_key(obj)
# Check that the library exists on the filesystem.
if obj_key.file_exists():
# Get the arch and soname from LinkageMap._obj_properties if
@@ -520,7 +517,7 @@ class LinkageMap(object):
"""
basename = os.path.basename(obj)
- obj_key = self._ObjectKey(obj, self._root)
+ obj_key = self._obj_key(obj)
if obj_key not in self._obj_properties:
raise KeyError("%s (%s) not in object list" % (obj_key, obj))
soname = self._obj_properties[obj_key][3]
@@ -597,11 +594,9 @@ class LinkageMap(object):
if obj_key not in self._obj_properties:
raise KeyError("%s not in object list" % obj_key)
else:
- obj_key = self._obj_key_cache.get(obj)
+ obj_key = self._obj_key(obj)
if obj_key not in self._obj_properties:
- obj_key = self._ObjectKey(obj, self._root)
- if obj_key not in self._obj_properties:
- raise KeyError("%s (%s) not in object list" % (obj_key, obj))
+ raise KeyError("%s (%s) not in object list" % (obj_key, obj))
arch, needed, path, _, _ = self._obj_properties[obj_key]
path_keys = set(self._path_key(x) for x in path.union(self._defpath))
@@ -651,11 +646,9 @@ class LinkageMap(object):
objs = self._obj_properties[obj_key][4]
else:
objs = set([obj])
- obj_key = self._obj_key_cache.get(obj)
+ obj_key = self._obj_key(obj)
if obj_key not in self._obj_properties:
- obj_key = self._ObjectKey(obj, self._root)
- if obj_key not in self._obj_properties:
- raise KeyError("%s (%s) not in object list" % (obj_key, obj))
+ raise KeyError("%s (%s) not in object list" % (obj_key, obj))
# If there is another version of this lib with the
# same soname and the master link points to that