From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RiC1p-0003DI-Rc for garchives@archives.gentoo.org; Tue, 03 Jan 2012 21:36:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13DAA21C032; Tue, 3 Jan 2012 21:36:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DA91721C032 for ; Tue, 3 Jan 2012 21:36:09 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 614751B4012 for ; Tue, 3 Jan 2012 21:36:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CFFCE80042 for ; Tue, 3 Jan 2012 21:36:08 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/__init__.py X-VCS-Directories: pym/portage/util/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: bce4fd1520fed9f35c8004f98ef3ed489efaa5db Date: Tue, 3 Jan 2012 21:36:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: e6814b0e-7389-484d-819f-8c218d2e8247 X-Archives-Hash: 46fea7839c0c9a081b1c7acefb06daf1 commit: bce4fd1520fed9f35c8004f98ef3ed489efaa5db Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Tue Jan 3 21:28:47 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jan 3 21:34:18 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dbce4fd15 Support include directives in ld.so.conf. --- pym/portage/util/__init__.py | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 54e6839..db8eb94 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -25,6 +25,7 @@ import stat import string import sys import traceback +import glob =20 import portage portage.proxy.lazyimport.lazyimport(globals(), @@ -1596,12 +1597,22 @@ def find_updated_config_files(target_root, config= _protect): yield (x, None) =20 def getlibpaths(root, env=3DNone): + def read_ld_so_conf(path): + for l in grabfile(path): + if l.startswith('include '): + subpath =3D os.path.join(os.path.dirname(path), l[8:].strip()) + for p in glob.glob(subpath): + for r in read_ld_so_conf(p): + yield r + else: + yield l + """ Return a list of paths that are used for library lookups """ if env is None: env =3D os.environ # the following is based on the information from ld.so(8) rval =3D env.get("LD_LIBRARY_PATH", "").split(":") - rval.extend(grabfile(os.path.join(root, "etc", "ld.so.conf"))) + rval.extend(read_ld_so_conf(os.path.join(root, "etc", "ld.so.conf"))) rval.append("/usr/lib") rval.append("/lib") =20