From 1260871a827b51c80e3ae07ad4f92985fcbc8b20 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 7 Nov 2008 16:23:36 +0000 Subject: Combine redundant arch_map code inside LinkageMap.rebuild(). svn path=/main/trunk/; revision=11819 --- pym/portage/dbapi/vartree.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'pym') 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( -- cgit v1.2.3-1-g7c22