summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-22 16:24:27 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-22 16:31:12 (EDT)
commitbaf7e22edb788cf92642fc34892268368823ebaa (patch)
treeccfb2a0760b5fb9447b07472eef3836f93023707
parentee3be7a6ec399ac5df0e699b11c547fceef0b29f (diff)
oh-shlibdeps: Search RTLD paths with ldconfig
-rw-r--r--src/oh-shlibdeps.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/oh-shlibdeps.sh b/src/oh-shlibdeps.sh
index 8077166..7e2d594 100644
--- a/src/oh-shlibdeps.sh
+++ b/src/oh-shlibdeps.sh
@@ -21,20 +21,23 @@
. '@pkgdatadir@/load.sm'
-LIBRARY_PATH='@library_path@'
READELF_NEEDED_SED='s/^ 0x[0-9a-f]* (NEEDED) *Shared library: \[\(.*\)\]$/\1/p'
find_lib()
{
local lib="${1}"
shift 1
+ local rtld_dirs=
local pkg=
local dir=
+ rtld_dirs="$(@LDCONFIG@ -v 2>/dev/null | \
+ sed -n 's/^\([^\t].*\):$/\1/p')"
+
# Check just-built packages.
for pkg in *.data/; do
IFS=':'
- for dir in ${LIBRARY_PATH}; do
+ for dir in ${rtld_dirs}; do
unset IFS
if [ -r "${pkg}/${dir}/${lib}" ]; then
printf '%s,\n' "${pkg%.data/}"
@@ -46,7 +49,7 @@ find_lib()
# Check installed packages.
IFS=':'
- for dir in ${LIBRARY_PATH}; do
+ for dir in ${rtld_dirs}; do
unset IFS
if [ -r "${dir}/${lib}" ]; then
lib="${dir}/${lib}"