Package: dpkg-dev
Version: 1.17.1
Severity: wishlist
File: /usr/bin/dpkg-shlibdeps
Tags: patch

Some shared libraries are stuck with nonstandard names for binary
compatibility's sake; a good example is libnspr4, which ships
/usr/lib/ARCH/libplc4.so, .../libplds4.so, and .../libnspr4.so.  (The
SONAME field in the ELF headers in each case matches the filename.)  I
do not propose to make all the changes (not least to Policy) to make
this fully supported, but I think dpkg-shlibdeps should not throw up
its hands at such libraries.  This is the minimal patch to do that.

For shared libraries that have no version number at all in their name,
we don't want to equate that to version "0", so I've opted to make
split_soname return "." for $libversion.  This won't actually get
written to a shlibs file (since this is -shlibdeps, not -makeshlibs)
and it sorts ASCIIbetically before "0".

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg-dev depends on:
ii  base-files    7.2
ii  binutils      2.23.52.20130828-1
ii  bzip2         1.0.6-5
ii  libdpkg-perl  1.17.1
ii  make          3.81-8.2
ii  patch         2.7.1-3
ii  xz-utils      5.1.1alpha+20120614-2

Versions of packages dpkg-dev recommends:
ii  build-essential          11.6
ii  clang-3.2 [c-compiler]   1:3.2repack-11
ii  fakeroot                 1.19-2
ii  gcc [c-compiler]         4:4.8.1-3
ii  gcc-4.6 [c-compiler]     4.6.4-4
ii  gcc-4.7 [c-compiler]     4.7.3-7
ii  gcc-4.8 [c-compiler]     4.8.1-10
ii  gnupg                    1.4.14-1
ii  gpgv                     1.4.14-1
ii  libalgorithm-merge-perl  0.08-2

Versions of packages dpkg-dev suggests:
ii  debian-keyring  2013.07.31

-- no debconf information
--- dpkg-1.17.1.o/scripts/dpkg-shlibdeps.pl	2013-07-28 05:56:47.000000000 -0400
+++ dpkg-1.17.1/scripts/dpkg-shlibdeps.pl	2013-09-19 14:11:34.583442876 -0400
@@ -672,6 +672,10 @@
 	return wantarray ? ($1, $2) : 1;
     } elsif ($soname =~ /^(.*)-(\d.*)\.so$/) {
 	return wantarray ? ($1, $2) : 1;
+    } elsif ($soname =~ /^(.*?\D)(\d+)\.so$/) {
+	return wantarray ? ($1, $2) : 1;
+    } elsif ($soname =~ /^(\D+)\.so$/) {
+        return wantarray ? ($1, ".") : 1;
     } else {
 	return wantarray ? () : 0;
     }

Reply via email to