config: quote PORTDIR_OVERLAY paths more
authorZac Medico <zmedico@gentoo.org>
Sat, 17 Sep 2011 05:50:36 +0000 (22:50 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 17 Sep 2011 05:50:36 +0000 (22:50 -0700)
This fixes the issue in bug #383269, comment #3.

pym/portage/package/ebuild/config.py

index bf888948184df7bff4d61d1eed81d71b6b10ccca..73af0660e3bc194d0968a64c1924811483f2b773 100644 (file)
@@ -511,11 +511,11 @@ class config(object):
 
                        new_ov = []
                        if portdir_overlay:
-                               whitespace_re = re.compile(r"\s")
+                               shell_quote_re = re.compile(r"[\s\\\"'$`]")
                                for ov in portdir_overlay:
                                        ov = normalize_path(ov)
                                        if os.path.isdir(ov):
-                                               if whitespace_re.search(ov) is not None:
+                                               if shell_quote_re.search(ov) is not None:
                                                        ov = portage._shell_quote(ov)
                                                new_ov.append(ov)
                                        else: