|
|
@@ -103,7 +103,6 @@ my %shlibs;
|
|
|
|
|
|
my $cur_field;
|
|
|
foreach my $file (keys %exec) {
|
|
|
- my $pkg_root = guess_pkg_root_dir($file);
|
|
|
$cur_field = $exec{$file};
|
|
|
print "Scanning $file (for $cur_field field)\n" if $debug;
|
|
|
|
|
|
@@ -187,7 +186,7 @@ foreach my $file (keys %exec) {
|
|
|
my $libobj = $dumplibs_wo_symfile->get_object($id);
|
|
|
# Only try to generate a dependency for libraries with a SONAME
|
|
|
if ($libobj->is_public_library() and not
|
|
|
- add_shlibs_dep($soname, $pkg, $pkg_root)) {
|
|
|
+ add_shlibs_dep($soname, $pkg, $lib)) {
|
|
|
# This failure is fairly new, try to be kind by
|
|
|
# ignoring as many cases that can be safely ignored
|
|
|
my $ignore = 0;
|
|
|
@@ -451,12 +450,21 @@ sub update_dependency_version {
|
|
|
}
|
|
|
|
|
|
sub add_shlibs_dep {
|
|
|
- my ($soname, $pkg, $pkg_root) = @_;
|
|
|
+ my ($soname, $pkg, $libfile) = @_;
|
|
|
my @shlibs = ($shlibslocal, $shlibsoverride);
|
|
|
- # Make sure the shlibs of the current package is analyzed before the
|
|
|
- # shlibs of other binary package from the same source
|
|
|
- push @shlibs, "$pkg_root/DEBIAN/shlibs" if defined($pkg_root);
|
|
|
- push @shlibs, @pkg_shlibs, "$admindir/info/$pkg.shlibs", $shlibsdefault;
|
|
|
+ if ($pkg eq "") {
|
|
|
+ # If the file is not packaged, try to find out the shlibs file in
|
|
|
+ # the package being built where the lib has been found
|
|
|
+ my $pkg_root = guess_pkg_root_dir($libfile);
|
|
|
+ if (defined $pkg_root) {
|
|
|
+ push @shlibs, "$pkg_root/DEBIAN/shlibs";
|
|
|
+ }
|
|
|
+ # Fallback to other shlibs files but it shouldn't be necessary
|
|
|
+ push @shlibs, @pkg_shlibs;
|
|
|
+ } else {
|
|
|
+ push @shlibs, "$admindir/info/$pkg.shlibs";
|
|
|
+ }
|
|
|
+ push @shlibs, $shlibsdefault;
|
|
|
print "Looking up shlibs dependency of $soname provided by '$pkg'\n" if $debug;
|
|
|
foreach my $file (@shlibs) {
|
|
|
next if not -e $file;
|