From 50f4a319f649589e016894a8375ad516db25042d Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Thu, 22 Nov 2007 09:29:35 +0100 Subject: [PATCH] dpkg-shlibdeps: add more debug messages --- ChangeLog | 4 ++++ debian/changelog | 4 +++- scripts/dpkg-shlibdeps.pl | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 684e269e..be1775e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-11-22 Raphael Hertzog + + * scripts/dpkg-shlibdeps.pl: Add more debug messages. + 2007-11-21 Raphael Hertzog * scripts/Dpkg/Shlibs/Objdump.pm: Fix the checks in is_executable() and diff --git a/debian/changelog b/debian/changelog index 70832f5f..e784fa05 100644 --- a/debian/changelog +++ b/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) diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 8902b948..800460df 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/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; } -- 2.39.5