Warn if a library is not found.
authorMikko Värri <vmj@linuxbox.fi>
Sat, 8 Oct 2011 11:26:09 +0000 (14:26 +0300)
committerMikko Värri <vmj@linuxbox.fi>
Sat, 8 Oct 2011 11:26:09 +0000 (14:26 +0300)
lib/Slackware/File.pm

index 8345b18..be9c9eb 100644 (file)
@@ -165,11 +165,16 @@ sub required_shared_libraries {
         chomp($line);
         $line =~ s[^\s+][];
         $line =~ s[\s+$][];
-        $line =~ s[^[-_./a-zA-Z0-9+]+\s+=>\s+][];
+        $line =~ s[^([-_./a-zA-Z0-9+]+)\s+=>\s+][];
+        my $dynlib = $1 if defined $1;
         $line =~ s[\s*\(0x[0-9a-fA-F]+\)$][];
         next unless $line;
         # some shared libs are themselves statically linked (e.g. libaio).
         next if $line eq "statically linked";
+        if ( $line eq "not found") {
+            print "WARNING: $fsname: $dynlib: not found\n";
+            next;
+        }
         if ( -l "$line" ) {
             my $dest = Slackware::Cache::readlink($line);
             chomp($dest);