Fix the normalize_needed regex to properly match //
authorZac Medico <zmedico@gentoo.org>
Wed, 17 Oct 2007 21:44:42 +0000 (21:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 17 Oct 2007 21:44:42 +0000 (21:44 -0000)
anywhere in the path. Also add support for detection
of . or .. where appropriate. (trunk r8166)

svn path=/main/branches/2.1.2/; revision=8167

pym/portage.py

index 18348da489db60d9048952fa7c70eb5fb257e52a..bbe2afdd1abcab72fa143bcaa1526c20532c0b8f 100644 (file)
@@ -7162,7 +7162,7 @@ class dblink:
        """
 
        import re
-       _normalize_needed = re.compile(r'//|^[^/]|.+/$')
+       _normalize_needed = re.compile(r'.*//.*|^[^/]|.+/$|(^|.*/)\.\.?(/.*|$)')
 
        def __init__(self, cat, pkg, myroot, mysettings, treetype=None,
                vartree=None):