Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/
Date: Tue, 03 Jan 2012 21:59:47
Message-Id: f132600314270f5fbbd168d941566d0fd877eb18.zmedico@gentoo
1 commit: f132600314270f5fbbd168d941566d0fd877eb18
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 3 21:59:25 2012 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 3 21:59:25 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f1326003
7
8 getlibpaths: regex for include
9
10 ---
11 pym/portage/util/__init__.py | 8 ++++++--
12 1 files changed, 6 insertions(+), 2 deletions(-)
13
14 diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py
15 index db8eb94..58501dc 100644
16 --- a/pym/portage/util/__init__.py
17 +++ b/pym/portage/util/__init__.py
18 @@ -1596,11 +1596,15 @@ def find_updated_config_files(target_root, config_protect):
19 else:
20 yield (x, None)
21
22 +_ld_so_include_re = re.compile(r'^include\s+(\S.*)')
23 +
24 def getlibpaths(root, env=None):
25 def read_ld_so_conf(path):
26 for l in grabfile(path):
27 - if l.startswith('include '):
28 - subpath = os.path.join(os.path.dirname(path), l[8:].strip())
29 + include_match = _ld_so_include_re.match(l)
30 + if include_match is not None:
31 + subpath = os.path.join(os.path.dirname(path),
32 + include_match.group(1))
33 for p in glob.glob(subpath):
34 for r in read_ld_so_conf(p):
35 yield r