+2007-11-28 Raphael Hertzog <hertzog@debian.org>
+
+ * scripts/dpkg-shlibdeps.pl (find_packages): Make sure to always
+ return [''] for a miss in the 'dpkg -S' query.
+ * scripts/dpkg-shlibdeps.pl: Always try the realpath($lib) as
+ fallback to identify the package (even if it's not a symlink)
+ because due to broken RPATH we might get library filenames such as
+ "/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl.so.9.8"
+ which is not a symlink and which can still be simplified to
+ "/usr/lib/libssl.so.9.8" with realpath().
+
2007-11-25 Raphael Hertzog <hertzog@debian.org>
* scripts/Dpkg/Shlibs.pm (find_library): Canonicalize paths before
* Add -I<file> option to dpkg-gensymbols to force the usage of a specific
symbols file.
* Dpkg::Shlibs::find_library() now returns canonicalized paths.
+ * dpkg-shlibdeps always tries the realpath() of a lib as fallback when
+ trying to identify the package of a lib (and not only for symlinks).
-- Guillem Jover <guillem@debian.org> Sat, 24 Nov 2007 07:38:13 +0200
"'shlibs' files are looked into)."), $soname)
unless defined($lib);
$libfiles{$lib} = $soname;
- if (-l $lib) {
- $altlibfiles{realpath($lib)} = $soname;
+ my $reallib = realpath($lib);
+ if ($reallib ne $lib) {
+ $altlibfiles{$reallib} = $soname;
}
print "Library $soname found in $lib\n" if $debug;
}
my @soname_wo_symfile;
foreach my $lib (keys %libfiles) {
my $soname = $libfiles{$lib};
- if (not exists $file2pkg->{$lib} and -l $lib) {
- # If the lib found is an unpackaged symlink, we try a fallback
+ if (not scalar(grep { $_ ne '' } @{$file2pkg->{$lib}})) {
+ # The path of the library as calculated is not the
+ # official path of a packaged file, try to fallback on
# on the realpath() first, maybe this one is part of a package
my $reallib = realpath($lib);
if (exists $file2pkg->{$reallib}) {
$file2pkg->{$lib} = $file2pkg->{$reallib};
}
}
- if (not exists $file2pkg->{$lib}) {
+ if (not scalar(grep { $_ ne '' } @{$file2pkg->{$lib}})) {
# If the library is really not available in an installed package,
# it's because it's in the process of being built
# Empty package name will lead to consideration of symbols
} else {
push @files, $_;
$cached_pkgmatch{$_} = [""]; # placeholder to cache misses too.
+ $pkgmatch->{$_} = [""]; # might be replaced later on
}
}
return $pkgmatch unless scalar(@files);