The following commit has been merged in the lenny branch:
commit d26d0017297f9c041ec0ddee0a324a658e7cbda8
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Wed Nov 19 19:20:32 2008 +0100
dpkg-shlibdeps: avoid spurious warnings due to bad parsing of objdump
* scripts/Dpkg/Shlibs/Objdump.pm (parse_dynamic_symbol): Fix the
regular expression to not require two space between alignment and
symbol name.
* scripts/t/200_Dpkg_Shlibs.t,
scripts/t/200_Dpkg_Shlibs/objdump.ls: Add a non-regression test
corresponding to the above case.
diff --git a/ChangeLog b/ChangeLog
index 07dcf34..da9a7bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-11-19 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * scripts/Dpkg/Shlibs/Objdump.pm (parse_dynamic_symbol): Fix the
+ regular expression to not require two space between alignment and
+ symbol name.
+ * scripts/t/200_Dpkg_Shlibs.t,
+ scripts/t/200_Dpkg_Shlibs/objdump.ls: Add a non-regression test
+ corresponding to the above case.
+
2008-11-18 Guillem Jover <[EMAIL PROTECTED]>
* configure.ac: Bump version to 1.14.24~.
diff --git a/debian/changelog b/debian/changelog
index 7dfce6c..c6d304a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
dpkg (1.14.24) UNRELEASED; urgency=low
- *
+ [ Raphael Hertzog ]
+ * Fix parsing of objdump output (by dpkg-shlibdeps) in a special case where
+ the symbol name is separated only with a single space. Closes: #506139
-- Guillem Jover <[EMAIL PROTECTED]> Tue, 18 Nov 2008 12:40:33 +0200
diff --git a/scripts/Dpkg/Shlibs/Objdump.pm b/scripts/Dpkg/Shlibs/Objdump.pm
index 9bb9802..0cb7ddf 100644
--- a/scripts/Dpkg/Shlibs/Objdump.pm
+++ b/scripts/Dpkg/Shlibs/Objdump.pm
@@ -252,7 +252,7 @@ sub _parse {
sub parse_dynamic_symbol {
my ($self, $line) = @_;
my $vis_re = '(\.protected|\.hidden|\.internal|0x\S+)';
- if ($line =~ /^[0-9a-f]+
(.{7})\s+(\S+)\s+[0-9a-f]+\s+(\S+)?(?:(?:\s+$vis_re)?\s+(\S+))/) {
+ if ($line =~ /^[0-9a-f]+
(.{7})\s+(\S+)\s+[0-9a-f]+(?:\s+(\S+))?(?:\s+$vis_re)?\s+(\S+)/) {
my ($flags, $sect, $ver, $vis, $name) = ($1, $2, $3, $4, $5);
diff --git a/scripts/t/200_Dpkg_Shlibs.t b/scripts/t/200_Dpkg_Shlibs.t
index 28e2a5d..c6713d6 100644
--- a/scripts/t/200_Dpkg_Shlibs.t
+++ b/scripts/t/200_Dpkg_Shlibs.t
@@ -1,6 +1,6 @@
# -*- mode: cperl;-*-
-use Test::More tests => 36;
+use Test::More tests => 37;
use IO::String;
use strict;
@@ -44,6 +44,9 @@ my $sym = $obj->get_symbol('[EMAIL PROTECTED]');
ok($sym, '[EMAIL PROTECTED] exists');
ok(!$sym->{'defined'}, 'R_*_COPY relocations are taken into account');
+# Non-regression test for #506139
+$sym = $obj->get_symbol('singlespace');
+ok($sym, 'version less symbol separated by a single space are correctly
parsed');
open $objdump, '<', "$srcdir/objdump.libc6-2.6"
or die "$srcdir/objdump.libc6-2.6: $!";
diff --git a/scripts/t/200_Dpkg_Shlibs/objdump.ls
b/scripts/t/200_Dpkg_Shlibs/objdump.ls
index f679242..d024402 100644
--- a/scripts/t/200_Dpkg_Shlibs/objdump.ls
+++ b/scripts/t/200_Dpkg_Shlibs/objdump.ls
@@ -156,6 +156,7 @@ DYNAMIC SYMBOL TABLE:
00000000 DF *UND* 00000054 GLIBC_2.0 strcmp
00000000 DF *UND* 000000fa GLIBC_2.0 exit
00000000 DF *UND* 000004bc ACL_1.0 acl_from_text
+00000000 DF *UND* 00000075 singlespace
0805bc90 g D *ABS* 00000000 Base _end
0805b860 g DO .bss 00000004 GLIBC_2.0 stdout
0805b82c g D *ABS* 00000000 Base _edata
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]