summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-07 16:23:36 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-07 16:23:36 +0000
commit1260871a827b51c80e3ae07ad4f92985fcbc8b20 (patch)
treeb489ba97b74816d923662c81abff7ecb0e70ad3d
parent6fa289cf255664146bc4a27fa85d601cb10bf4df (diff)
downloadportage-1260871a827b51c80e3ae07ad4f92985fcbc8b20.tar.gz
portage-1260871a827b51c80e3ae07ad4f92985fcbc8b20.tar.bz2
portage-1260871a827b51c80e3ae07ad4f92985fcbc8b20.zip
Combine redundant arch_map code inside LinkageMap.rebuild().
svn path=/main/trunk/; revision=11819
-rw-r--r--pym/portage/dbapi/vartree.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index d80e9a69a..0bac6582d 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -285,11 +285,11 @@ class LinkageMap(object):
"${ORIGIN}", os.path.dirname(obj)).replace(
"$ORIGIN", os.path.dirname(obj)).split(":"))])
needed = filter(None, fields[4].split(","))
+ arch_map = libs.get(arch)
+ if arch_map is None:
+ arch_map = {}
+ libs[arch] = arch_map
if soname:
- arch_map = libs.get(arch)
- if arch_map is None:
- arch_map = {}
- libs[arch] = arch_map
soname_map = arch_map.get(soname)
if soname_map is None:
soname_map = self._soname_map_class(
@@ -297,10 +297,6 @@ class LinkageMap(object):
arch_map[soname] = soname_map
soname_map.providers.add(obj_key)
for needed_soname in needed:
- arch_map = libs.get(arch)
- if arch_map is None:
- arch_map = {}
- libs[arch] = arch_map
soname_map = arch_map.get(needed_soname)
if soname_map is None:
soname_map = self._soname_map_class(