From: Fabian Groffen Date: Tue, 10 Jan 2012 17:33:16 +0000 (+0100) Subject: Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b881a4d55a20639caf2f89b2f9b7548446fd81e;p=portage.git Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix Conflicts: bin/ebuild.sh bin/phase-functions.sh pym/portage/util/__init__.py --- 4b881a4d55a20639caf2f89b2f9b7548446fd81e diff --cc bin/ebuild.sh index 30c34e81d,f8e71f5f2..efd628530 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@@ -1,9 -1,9 +1,9 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ - # Copyright 1999-2011 Gentoo Foundation + # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}" -PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}" +PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}" +PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}" # Prevent aliases from causing portage to act inappropriately. # Make sure it's before everything so we don't mess aliases that follow. diff --cc bin/phase-functions.sh index c002a3481,ce251ceb9..86df843d9 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@@ -1,5 -1,5 +1,5 @@@ -#!/bin/bash +#!@PREFIX_PORTAGE_BASH@ - # Copyright 1999-2011 Gentoo Foundation + # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Hardcoded bash lists are needed for backward compatibility with diff --cc pym/portage/util/__init__.py index 257da6523,58501dca6..3fdc5cf63 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@@ -1600,22 -1614,10 +1615,22 @@@ def getlibpaths(root, env=None) """ Return a list of paths that are used for library lookups """ if env is None: env = os.environ + + # PREFIX HACK: LD_LIBRARY_PATH isn't portable, and considered + # harmfull, so better not use it. We don't need any host OS lib + # paths either, so do Prefix case. + if EPREFIX != '': + rval = [] + rval.append(EPREFIX + "/usr/lib") + rval.append(EPREFIX + "/lib") + # we don't know the CHOST here, so it's a bit hard to guess + # where GCC's and ld's libs are. Though, GCC's libs should be + # in lib and usr/lib, binutils' libs rarely used + else: # the following is based on the information from ld.so(8) - rval = env.get("LD_LIBRARY_PATH", "").split(":") - rval.extend(read_ld_so_conf(os.path.join(root, "etc", "ld.so.conf"))) - rval.append("/usr/lib") - rval.append("/lib") + rval = 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") return [normalize_path(x) for x in rval if x]