瀏覽代碼

dpkg-shlibdeps: make shlibs.local override symbols files too

As discussed in http://lists.debian.org/debian-devel/2009/03/msg00428.html
dropping the shlibs.local package override for symbols files was not
necessarily a good idea. So this commit makes dpkg-shlibdeps skip
the symbols files for a library if it detects that the relevant dependency
is available in the shlibs.local file.
Raphael Hertzog 17 年之前
父節點
當前提交
5ee2d60084
共有 2 個文件被更改,包括 10 次插入2 次删除
  1. 2 1
      man/dpkg-shlibdeps.1
  2. 8 1
      scripts/dpkg-shlibdeps.pl

+ 2 - 1
man/dpkg-shlibdeps.1

@@ -35,7 +35,8 @@ Then, for each library, it looks up either the
 .I symbols
 file, or the
 .I shlibs
-file (if the former doesn't exist). Both files are supposed to be provided
+file (if the former doesn't exist or if debian/shlibs.local contains
+the relevant dependency). Both files are supposed to be provided
 by the library package and should thus be available as
 /var/lib/dpkg/info/\fIpackage\fR.\fIsymbols\fR
 or /var/lib/dpkg/info/\fIpackage\fR.\fIshlibs\fR. The package name is

+ 8 - 1
scripts/dpkg-shlibdeps.pl

@@ -199,8 +199,15 @@ foreach my $file (keys %exec) {
 	# Load symbols/shlibs files from packages providing libraries
 	foreach my $pkg (@{$file2pkg->{$lib}}) {
 	    my $symfile_path;
-	    if ($packagetype eq "deb") {
+            my $haslocaldep = 0;
+            if (-e $shlibslocal and
+                defined(extract_from_shlibs($soname, $shlibslocal)))
+            {
+                $haslocaldep = 1;
+            }
+            if ($packagetype eq "deb" and not $haslocaldep) {
 		# Use fine-grained dependencies only on real deb
+                # and only if the dependency is not provided by shlibs.local
 		$symfile_path = find_symbols_file($pkg, $soname, $lib);
             }
             if (defined($symfile_path)) {