From: Zac Medico Date: Sat, 4 Nov 2006 05:52:09 +0000 (-0000) Subject: Filter empty elements in cumulative env-update variables. Thanks to Brian Harring... X-Git-Tag: v2.1.1-r2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e5b7d939ef00d3241bfdf4fc2689100c7c4ab9de;p=portage.git Filter empty elements in cumulative env-update variables. Thanks to Brian Harring for this patch from bug #151694. (trunk r4741) svn path=/main/branches/2.1.1/; revision=4933 --- diff --git a/pym/portage.py b/pym/portage.py index 7844dc2cc..6c67ac11f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -509,7 +509,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None): mylist = [] for myconfig in config_list: if var in myconfig: - mylist.extend(myconfig[var].split()) + mylist.extend(filter(None, myconfig[var].split())) del myconfig[var] # prepare for env.update(myconfig) if mylist: env[var] = " ".join(mylist) @@ -519,7 +519,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None): mylist = [] for myconfig in config_list: if var in myconfig: - mylist.extend(myconfig[var].split(":")) + mylist.extend(filter(None, myconfig[var].split(":"))) del myconfig[var] # prepare for env.update(myconfig) if mylist: env[var] = ":".join(mylist)