From 0639bc06013e31a3bccd9c909ac426c59ba59092 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Thu, 22 Nov 2007 11:26:17 +0100 Subject: [PATCH] dpkg-shlibdeps: accepts empty dependencies in shlibs files --- ChangeLog | 3 ++- debian/changelog | 1 + scripts/dpkg-shlibdeps.pl | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index be1775e6..bd9ba19b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2007-11-22 Raphael Hertzog - * scripts/dpkg-shlibdeps.pl: Add more debug messages. + * scripts/dpkg-shlibdeps.pl: Add more debug messages. Accept empty + dependencies in shlibs files again. 2007-11-21 Raphael Hertzog diff --git a/debian/changelog b/debian/changelog index e784fa05..5cfc8898 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ dpkg (1.14.10) UNRELEASED; urgency=low Closes: #452262 * Add more debug messages to dpkg-shlibdeps to ease collecting information in case of problems. + * dpkg-shlibdeps now accepts again empty dependencies in shlibs files. [ Updated man pages translations ] * Swedish (Peter Karlsson) diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 800460df..6120b668 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -369,11 +369,12 @@ sub extract_from_shlibs { while () { s/\s*\n$//; next if m/^\#/; - if (!m/^\s*(?:(\S+):\s+)?(\S+)\s+(\S+)\s+(\S.*\S)\s*$/) { + if (!m/^\s*(?:(\S+):\s+)?(\S+)\s+(\S+)(?:\s+(\S.*\S))?\s*$/) { warning(_g("shared libs info file \`%s' line %d: bad line \`%s'"), $shlibfile, $., $_); next; } + my $depread = defined($4) ? $4 : ''; if (($libname eq $2) && ($libversion eq $3)) { # Define dep and end here if the package type explicitely # matches. Otherwise if the packagetype is not specified, use @@ -381,11 +382,11 @@ sub extract_from_shlibs { # line if (defined($1)) { if ($1 eq $packagetype) { - $dep = $4; + $dep = $depread; last; } } else { - $dep = $4 unless defined $dep; + $dep = $depread unless defined $dep; } } } -- 2.39.5