From: Zac Medico Date: Mon, 30 Jul 2007 03:09:24 +0000 (-0000) Subject: Remove duplicate entries from special variables processed by env_update() (bug #17219... X-Git-Tag: v2.1.2.11~70 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0988626678159719909d93917bae53f9c7ffefa1;p=portage.git Remove duplicate entries from special variables processed by env_update() (bug #172194) (branches/2.1.2 r6757 and r6759) svn path=/main/branches/2.1.2.9/; revision=7447 --- diff --git a/pym/portage.py b/pym/portage.py index 167460f83..ea1f820e7 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -595,7 +595,9 @@ 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(filter(None, myconfig[var].split())) + for item in myconfig[var].split(): + if item and not item in mylist: + mylist.append(item) del myconfig[var] # prepare for env.update(myconfig) if mylist: env[var] = " ".join(mylist) @@ -605,7 +607,9 @@ 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(filter(None, myconfig[var].split(":"))) + for item in myconfig[var].split(":"): + if item and not item in mylist: + mylist.append(item) del myconfig[var] # prepare for env.update(myconfig) if mylist: env[var] = ":".join(mylist)