diff options
author | Guillem Jover <guillem@debian.org> | 2006-04-09 19:31:47 +0000 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2006-04-09 19:31:47 +0000 |
commit | c7f4a5fc8a5c939d3b73f20ef3f4a919b7239406 (patch) | |
tree | f0c8ffe0c44928935e1aa230a8b6a713f071032f /scripts | |
parent | 69f5a7f1f2d4ace9c324b82a294a56df8b09dffe (diff) | |
download | dpkg-c7f4a5fc8a5c939d3b73f20ef3f4a919b7239406.tar.gz |
Support system library directories in dpkg-shlibdeps symlinked from
'/lib/ldconfig'. Closes: #356452
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dpkg-shlibdeps.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 202d2088f..b98ea3271 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -117,6 +117,23 @@ if ($ENV{LD_LIBRARY_PATH}) { } } +# Support system library directories. +my $ldconfigdir = '/lib/ldconfig'; +if (opendir(DIR, $ldconfigdir)) { + my @dirents = readdir(DIR); + closedir(DIR); + + for (@dirents) { + next if /^\./; + my $d = `readlink -f $ldconfigdir/$_`; + chomp $d; + unless (exists $librarypaths{$d}) { + $librarypaths{$d} = 'ldconfig'; + push @librarypaths, $d; + } + } +} + open CONF, '</etc/ld.so.conf' or warn( "couldn't open /etc/ld.so.conf: $!" ); while( <CONF> ) { |