From: Zac Medico Date: Tue, 17 Oct 2006 20:46:56 +0000 (-0000) Subject: Filter empty elements in cumulative env-update variables. Thanks to Brian Harring... X-Git-Tag: v2.1.2~612 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ff68c0393a328a04bff228d1e2a5aef7d2d21bbf;p=portage.git Filter empty elements in cumulative env-update variables. Thanks to Brian Harring for this patch from bug #151694. svn path=/main/trunk/; revision=4741 --- diff --git a/pym/portage.py b/pym/portage.py index 082b98c78..c50507368 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -593,7 +593,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=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) @@ -603,7 +603,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=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)