From: Marius Mauch Date: Tue, 5 Jun 2007 17:55:03 +0000 (-0000) Subject: Remove duplicate entries from special variables processed by env_update() (bug #172194) X-Git-Tag: v2.2_pre1~1294 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5db79baa543b6ea665f7b57c47997643d2e549b2;p=portage.git Remove duplicate entries from special variables processed by env_update() (bug #172194) svn path=/main/trunk/; revision=6736 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 5417a5c8c..89f4a1f4e 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -517,7 +517,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) @@ -527,7 +529,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)