commit: 1bc49bead14ddd31c94921fe9c3d1972f0737056 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> AuthorDate: Mon Jun 20 00:12:35 2016 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sat Jan 7 22:47:32 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1bc49bea
env-update: call ldconfig if found in EROOT prefix-standalone has a glibc installed by portage with ldconfig under EROOT/sbin. It should be called during env-update. For prefix-rpath, host glibc is used and env-update should not care about ldconfig. In this case, no ldconfig is in EROOT/sbin and ldconfig is skipped. X-Gentoo-Bug: 532100 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=532100 pym/portage/util/env_update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pym/portage/util/env_update.py b/pym/portage/util/env_update.py index c0a93a8..fde2f66 100644 --- a/pym/portage/util/env_update.py +++ b/pym/portage/util/env_update.py @@ -306,13 +306,17 @@ def _env_update(makelinks, target_root, prev_mtimes, contents, env, if not libdir_contents_changed: makelinks = False - ldconfig = "/sbin/ldconfig" if "CHOST" in settings and "CBUILD" in settings and \ settings["CHOST"] != settings["CBUILD"]: ldconfig = find_binary("%s-ldconfig" % settings["CHOST"]) + else: + ldconfig = os.path.join(eroot, "sbin", "ldconfig") + + if not (os.access(ldconfig, os.X_OK) and os.path.isfile(ldconfig)): + ldconfig = None # Only run ldconfig as needed - if makelinks and ldconfig and not eprefix: + if makelinks and ldconfig: # ldconfig has very different behaviour between FreeBSD and Linux if ostype == "Linux" or ostype.lower().endswith("gnu"): # We can't update links if we haven't cleaned other versions first, as
