Avoid parsing the whole tree to find libwine.so.
This commit is contained in:
parent
070e749cfb
commit
443904d59b
|
@ -217,7 +217,31 @@ sub Check_BaseFiles {
|
|||
$level = $is_ok;
|
||||
my @output = ();
|
||||
Do_Check("for correct .so lib config (please wait)");
|
||||
push (@output, `find / -name libwine.so 2>/dev/null`);
|
||||
|
||||
# Build list of library directories.
|
||||
# First parse ld.so.conf to find system-wide lib directories.
|
||||
my @dirlist = ();
|
||||
open (LDCONF, "</etc/ld.so.conf");
|
||||
while (<LDCONF>) {
|
||||
s/\#.*//; # eliminate comments
|
||||
chomp;
|
||||
if (-d $_) { push @dirlist, $_; }
|
||||
}
|
||||
close (LDCONF);
|
||||
# Next parse LD_LIBRARY_PATH to find user-specific lib dirs.
|
||||
my (@ld_dirs) = split (/:/, $ENV{'LD_LIBRARY_PATH'});
|
||||
my ($dir);
|
||||
foreach $dir (@ld_dirs) {
|
||||
if (-d $dir) { push @dirlist, $dir; }
|
||||
}
|
||||
|
||||
# Now check for a libwine.so in each directory
|
||||
foreach $dir (@dirlist) {
|
||||
my ($target) = $dir . "/libwine.so";
|
||||
if (-f $target) { push @output, $target; }
|
||||
}
|
||||
print "DEBUG: found libwine: @output\n";
|
||||
|
||||
if (@output > 1)
|
||||
{
|
||||
$level = $is_suspect;
|
||||
|
|
Loading…
Reference in New Issue