In LinkageMap.rebuild(), filter empty strings that may be returned from split
authorZac Medico <zmedico@gentoo.org>
Fri, 8 Aug 2008 21:37:50 +0000 (21:37 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 8 Aug 2008 21:37:50 +0000 (21:37 -0000)
calls when processing the "needed" and "path" entries. Thanks to Lucian Poston
for reporting.

svn path=/main/trunk/; revision=11355

pym/portage/dbapi/vartree.py

index e59571173b359045b512a563b9ac11c488405899..ff3d976b0f190e72debf2a178479ab6697765e8f 100644 (file)
@@ -173,8 +173,10 @@ class LinkageMap(object):
                        arch = fields[0]
                        obj = os.path.realpath(fields[1])
                        soname = fields[2]
-                       path = fields[3].replace("${ORIGIN}", os.path.dirname(obj)).replace("$ORIGIN", os.path.dirname(obj)).split(":")
-                       needed = fields[4].split(",")
+                       path = filter(None, fields[3].replace(
+                               "${ORIGIN}", os.path.dirname(obj)).replace(
+                               "$ORIGIN", os.path.dirname(obj)).split(":"))
+                       needed = filter(None, fields[4].split(","))
                        if soname:
                                libs.setdefault(soname, {arch: {"providers": [], "consumers": []}})
                                libs[soname].setdefault(arch, {"providers": [], "consumers": []})