=================================================================== RCS file: /cvs/openbsd/fill_chroot/find_depends,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- openbsd/fill_chroot/find_depends 2008/05/05 19:58:18 1.8 +++ openbsd/fill_chroot/find_depends 2008/05/05 20:02:57 1.9 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $RedRiver: find_depends,v 1.7 2008/04/22 20:08:41 andrew Exp $ +# $RedRiver: find_depends,v 1.8 2008/05/05 18:58:18 andrew Exp $ use strict; use warnings; @@ -92,9 +92,9 @@ open my $libs, '-|', '/usr/bin/ldd', $file or die "Couldn't open ldd '$file': $!"; while (<$libs>) { - next if length($_) < 56; chomp; - my $spec = substr $_, 56; + my ($spec) = (split(/\s+/, $_))[7]; + next if ! $spec; next if $spec !~ m{^/}xms; push @libs, $spec; }