summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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}"