From: Zac Medico Date: Tue, 3 Jan 2012 21:59:25 +0000 (-0800) Subject: getlibpaths: regex for include X-Git-Tag: v2.2.0_alpha85~51 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=f132600314270f5fbbd168d941566d0fd877eb18;p=portage.git getlibpaths: regex for include --- diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index db8eb94b1..58501dca6 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -1596,11 +1596,15 @@ def find_updated_config_files(target_root, config_protect): else: yield (x, None) +_ld_so_include_re = re.compile(r'^include\s+(\S.*)') + def getlibpaths(root, env=None): def read_ld_so_conf(path): for l in grabfile(path): - if l.startswith('include '): - subpath = os.path.join(os.path.dirname(path), l[8:].strip()) + include_match = _ld_so_include_re.match(l) + if include_match is not None: + subpath = os.path.join(os.path.dirname(path), + include_match.group(1)) for p in glob.glob(subpath): for r in read_ld_so_conf(p): yield r