diff options
author | Niels Thykier <niels@thykier.net> | 2015-01-07 21:52:45 +0100 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2015-03-28 10:04:19 +0100 |
commit | ad2042ad1a02eedc8d667a00d9a765e9c46f9c0b (patch) | |
tree | f5632a3931fc0432b679f4a8b62e1350a0251291 | |
parent | 063ea1adce9bc6f815a7aa34198e48eac9df36c3 (diff) | |
download | debhelper-ad2042ad1a02eedc8d667a00d9a765e9c46f9c0b.tar.gz |
Let dh_makeshlibs install shlibs files (instead of dh_installdeb)
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | debhelper.pod | 6 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rwxr-xr-x | dh_installdeb | 8 | ||||
-rwxr-xr-x | dh_makeshlibs | 24 |
4 files changed, 41 insertions, 1 deletions
diff --git a/debhelper.pod b/debhelper.pod index 82e3133a..2c33aaba 100644 --- a/debhelper.pod +++ b/debhelper.pod @@ -559,6 +559,12 @@ I<ldconfig> in its generated maintainer scripts snippets. The new call will only update the ld cache (instead of also updating symlinks). +=item - + +B<dh_installdeb> no longer installs a maintainer-provided +debian/I<package>.shlibs file. This is now done by B<dh_makeshlibs> +instead. + =back =back diff --git a/debian/changelog b/debian/changelog index 3e8489e5..959bac00 100644 --- a/debian/changelog +++ b/debian/changelog @@ -74,6 +74,10 @@ debhelper (9.20150101.1) UNRELEASED; urgency=medium (Closes: #659044) * dh_usrlocal: Apply patch from Jérémy Bobbio to generate deterministic output. (Closes: #775020) + * dh_makelibs: In compat 10, install the maintainer-provided shlibs + file (replacing the generated one). (Closes: #676168) + * dh_installdeb: In compat 10, stop installing the maintainer-provided + shilibs file as it is now done by dh_makeibs instead. [ Bernhard R. Link ] * Dh_lib: apply patch from Guillem Jover to support case-insensitive diff --git a/dh_installdeb b/dh_installdeb index 26c2b0c5..569b0a45 100755 --- a/dh_installdeb +++ b/dh_installdeb @@ -42,6 +42,9 @@ shell script snippets generated by other debhelper commands. These control files are installed into the F<DEBIAN> directory. +Note that I<package>.shlibs is only installed in compat level 9 and +earlier. In compat 10, please use L<dh_makeshlibs(1)>. + =item I<package>.conffiles This control file will be installed into the F<DEBIAN> directory. @@ -117,7 +120,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } # Install non-executable files - foreach my $file (qw{shlibs conffiles triggers}) { + my @non_exec_files = (qw{conffiles triggers}); + # In compat 10, we let dh_makeshlibs handle "shlibs". + push(@non_exec_files, 'shlibs') if compat(9); + foreach my $file (@non_exec_files) { my $f=pkgfile($package,$file); if ($f) { install_file($f, "$tmp/DEBIAN/$file"); diff --git a/dh_makeshlibs b/dh_makeshlibs index 66e446ac..c3156418 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -30,6 +30,15 @@ debian/control file for packages supporting multiarch. =over 4 +=item debian/I<package>.shlibs + +Installs this file, if present, into the package as DEBIAN/shlibs. If +omitted, debhelper will generate a shlibs file automatically if it +detects any libraries. + +Note in compat levels 9 and earlier, this file was installed by +qL<dh_installdeb(1)> rather than B<dh_makeshlibs>. + =item debian/I<package>.symbols =item debian/I<package>.symbols.I<arch> @@ -139,6 +148,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { my %seen; my $need_ldconfig = 0; my $is_multiarch = 0; + my $shlibs_file = pkgfile($package, 'shlibs'); doit("rm", "-f", "$tmp/DEBIAN/shlibs"); @@ -181,6 +191,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } my $deps=$package; if ($dh{V_FLAG_SET}) { + if ($shlibs_file) { + warning("The provided ${shlibs_file} file overwrites -V"); + # Clear the flag to avoid duplicate warnings. Note + # we can safely fallthrough as the result will be + # replaced regardless. + $dh{V_FLAG_SET} = 0; + } if ($dh{V_FLAG} ne '') { $deps=$dh{V_FLAG}; } @@ -233,6 +250,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } } + if ($shlibs_file) { + if (! -d "$tmp/DEBIAN") { + install_dir("$tmp/DEBIAN"); + } + install_file($shlibs_file, "$tmp/DEBIAN/shlibs"); + } + if (-e "$tmp/DEBIAN/shlibs") { doit("chmod","0644","$tmp/DEBIAN/shlibs"); doit("chown","0:0","$tmp/DEBIAN/shlibs"); |