diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-08 19:25:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-08 19:25:54 +0000 |
commit | c79efeffb25bb5c204163c6e2850e65b9b8566d9 (patch) | |
tree | 33ca6e53108cf40e13b5e8a9b631160ada9dd0a8 /pym/portage.py | |
parent | 208449403286dc93a5a22185faa028e43b8e75c2 (diff) | |
download | portage-c79efeffb25bb5c204163c6e2850e65b9b8566d9.tar.gz portage-c79efeffb25bb5c204163c6e2850e65b9b8566d9.tar.bz2 portage-c79efeffb25bb5c204163c6e2850e65b9b8566d9.zip |
Remove duplicate entries from special variables processed by env_update() (bug #172194) (trunk r6736 and r6738)
svn path=/main/branches/2.1.2/; revision=6757
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py index 8e8f87b7a..05283f3ff 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) |