Browse Source

dpkg-shlibdeps: add more debug messages

Raphael Hertzog 18 years ago
parent
commit
50f4a319f6
3 changed files with 13 additions and 2 deletions
  1. 4 0
      ChangeLog
  2. 3 1
      debian/changelog
  3. 6 1
      scripts/dpkg-shlibdeps.pl

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+2007-11-22  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-shlibdeps.pl: Add more debug messages.
+
 2007-11-21  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/Dpkg/Shlibs/Objdump.pm: Fix the checks in is_executable() and

+ 3 - 1
debian/changelog

@@ -2,9 +2,11 @@ dpkg (1.14.10) UNRELEASED; urgency=low
 
   [ Raphael Hertzog ]
   * dpkg-shlibdeps now correctly identify private libraries (avoid many
-    warnings with perl/python modules).
+    warnings with perl/python modules). Closes: #452338
   * Move capit() to a Dpkg::Fields module and use it in dpkg-shlibdeps.
     Closes: #452262
+  * Add more debug messages to dpkg-shlibdeps to ease collecting information
+    in case of problems.
 
   [ Updated man pages translations ]
   * Swedish (Peter Karlsson)

+ 6 - 1
scripts/dpkg-shlibdeps.pl

@@ -100,7 +100,8 @@ foreach my $file (keys %exec) {
 	failure(_g("couldn't find library %s (note: only packages with " .
 	           "'shlibs' files are looked into)."), $soname)
 	    unless defined($lib);
-	$libfiles{$lib} = $soname if defined($lib);
+	$libfiles{$lib} = $soname;
+	print "Library $soname found in $lib\n" if $debug;
     }
     my $file2pkg = find_packages(keys %libfiles);
     my $symfile = Dpkg::Shlibs::SymbolFile->new();
@@ -114,6 +115,7 @@ foreach my $file (keys %exec) {
 	    # Empty package name will lead to consideration of symbols
 	    # file from the package being built only
 	    $file2pkg->{$lib} = [""];
+	    print "No associated package found for $lib\n" if $debug;
 	}
 
 	# Load symbols/shlibs files from packages providing libraries
@@ -327,6 +329,7 @@ Dependency fields recognised are:
 
 sub add_shlibs_dep {
     my ($soname, $pkg) = @_;
+    print "Looking up shlibs dependency of $soname provided by '$pkg'\n" if $debug;
     foreach my $file ($shlibslocal, $shlibsoverride, @pkg_shlibs,
 			"$admindir/info/$pkg.shlibs",
 			$shlibsdefault)
@@ -334,12 +337,14 @@ sub add_shlibs_dep {
 	next if not -e $file;
 	my $dep = extract_from_shlibs($soname, $file);
 	if (defined($dep)) {
+	    print "Found $dep in $file\n" if $debug;
 	    foreach (split(/,\s*/, $dep)) {
 		$dependencies{$cur_field}{$_} = 1;
 	    }
 	    return 1;
 	}
     }
+    print "Found nothing\n" if $debug;
     return 0;
 }