diff options
author | Niels Thykier <niels@thykier.net> | 2016-04-03 08:39:26 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2016-04-03 08:52:04 +0000 |
commit | 7db165a0c870cf2b75d18426113c54036c4d61af (patch) | |
tree | 1ed7371b3829879836f7155c7622a43989ed91b4 | |
parent | f3bae5b5b39b76d5612e2ba79bf3a88745e2c03d (diff) | |
download | debhelper-7db165a0c870cf2b75d18426113c54036c4d61af.tar.gz |
dh_makeshlibs: Special case unversioned SO with symbols
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | debian/changelog | 3 | ||||
-rwxr-xr-x | dh_makeshlibs | 22 |
2 files changed, 18 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog index 339ceaf5..4a191dec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ debhelper (9.20160402+unreleased) UNRELEASED; urgency=medium report. * dh_makeshlibs: Use same regex for extracting SONAME as dpkg-shlibdeps. (Closes: #509931) + * dh_makeshlibs: Add an ldconfig trigger if there is an + unversioned SONAME and the maintainer provides a + symbols file. -- Niels Thykier <niels@thykier.net> Sat, 02 Apr 2016 20:57:18 +0000 diff --git a/dh_makeshlibs b/dh_makeshlibs index 0f1f6755..87a84ac8 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -145,7 +145,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); - my %seen; + my (%seen, $unversioned_so); my $need_ldconfig = 0; my $shlibs_file = pkgfile($package, 'shlibs'); @@ -176,6 +176,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) { # idiotic crap soname format $library=$1; $major=$2; + } elsif ($ret =~ m/\s+SONAME\s+(?:.*)\.so/) { + $unversioned_so = 1; } if (defined($dh{M_PARAMS}) && $dh{M_PARAMS} ne '') { @@ -233,12 +235,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) { complex_doit("echo '$_' >>$tmp/DEBIAN/shlibs"); } - # Historically, --noscripts would disable the creation of - # maintscripts for calling ldconfig. - if (! $dh{NOSCRIPTS} && $need_ldconfig) { - autotrigger($package, 'activate-noawait', 'ldconfig'); - } - if ($shlibs_file) { if (! -d "$tmp/DEBIAN") { install_dir("$tmp/DEBIAN"); @@ -273,8 +269,20 @@ foreach my $package (@{$dh{DOPACKAGES}}) { if (-f "$tmp/DEBIAN/symbols" and -s _ == 0) { doit("rm", "-f", "$tmp/DEBIAN/symbols"); + } elsif ($unversioned_so) { + # There are a few "special" libraries (e.g. nss/nspr) + # which do not have versined SONAMES. However the + # maintainer provides a symbols file for them and we can + # then use that to add an ldconfig trigger. + $need_ldconfig = 1; } } + + # Historically, --noscripts would disable the creation of + # maintscripts for calling ldconfig. + if (! $dh{NOSCRIPTS} && $need_ldconfig) { + autotrigger($package, 'activate-noawait', 'ldconfig'); + } } unless ($ok) { |