summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-08 21:37:50 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-08 21:37:50 +0000
commit2131c13ab14a4b4583d2915a798d0981b33be198 (patch)
tree4470ca39877ce664893ecaee07e7999a61e4b50e
parent23dc7b6793ed429f9b16ecbfaa78ed0a2d92a5bc (diff)
downloadportage-2131c13ab14a4b4583d2915a798d0981b33be198.tar.gz
portage-2131c13ab14a4b4583d2915a798d0981b33be198.tar.bz2
portage-2131c13ab14a4b4583d2915a798d0981b33be198.zip
In LinkageMap.rebuild(), filter empty strings that may be returned from split
calls when processing the "needed" and "path" entries. Thanks to Lucian Poston for reporting. svn path=/main/trunk/; revision=11355
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index e59571173..ff3d976b0 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -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": []})