[debhelper-devel] [debhelper] 02/03: dh_makeshlibs: Special case unversioned SO with symbols

Niels Thykier nthykier at moszumanska.debian.org
Sun Apr 3 08:59:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 7db165a0c870cf2b75d18426113c54036c4d61af
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Apr 3 08:39:26 2016 +0000

    dh_makeshlibs: Special case unversioned SO with symbols
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog |  3 +++
 dh_makeshlibs    | 22 +++++++++++++++-------
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 339ceaf..4a191de 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 at thykier.net>  Sat, 02 Apr 2016 20:57:18 +0000
 
diff --git a/dh_makeshlibs b/dh_makeshlibs
index 0f1f675..87a84ac 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list