Filter empty elements in cumulative env-update variables. Thanks to Brian Harring... v2.1.1-r2
authorZac Medico <zmedico@gentoo.org>
Sat, 4 Nov 2006 05:52:09 +0000 (05:52 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 4 Nov 2006 05:52:09 +0000 (05:52 -0000)
svn path=/main/branches/2.1.1/; revision=4933

pym/portage.py

index 7844dc2ccc2a84a9236f913675fc84eecbc33f25..6c67ac11ff1f014e85f01af200bf7330b739f683 100644 (file)
@@ -509,7 +509,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=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)
@@ -519,7 +519,7 @@ def env_update(makelinks=1, target_root=None, prev_mtimes=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)