summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-06-05 17:55:03 +0000
committerMarius Mauch <genone@gentoo.org>2007-06-05 17:55:03 +0000
commit5db79baa543b6ea665f7b57c47997643d2e549b2 (patch)
tree10995663769e707ffbf57bb014e4b711430aa270
parentcf17db9cba53ccd3e8fe2563a46a38da947d5e8f (diff)
downloadportage-5db79baa543b6ea665f7b57c47997643d2e549b2.tar.gz
portage-5db79baa543b6ea665f7b57c47997643d2e549b2.tar.bz2
portage-5db79baa543b6ea665f7b57c47997643d2e549b2.zip
Remove duplicate entries from special variables processed by env_update() (bug #172194)
svn path=/main/trunk/; revision=6736
-rw-r--r--pym/portage/__init__.py8
1 files changed, 6 insertions, 2 deletions
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)