Control: tags -1 patch On Tue, 05 Jun 2012 09:41:53 +0200 Andreas Beckmann <deb...@abeckmann.de> wrote: > Package: debhelper > Version: 9.20120419 > Severity: normal > > Hi, > > there is a problem with the shlibs sequence: > (noticed in fglrx-driver [non-free]) > > > [....] > > > The intention is to replace the "amd-libopencl1" package name with the > virtual package "libopencl1" that is provided by all implementations of > libOpenCL.so.1, unfortunately the amd-clinfo package picks up the strict > dependency on amd-libopencl1. This is not what I intended. > > In case that behavior is intended, it should be clearly documented. > > Andreas > > [...] > >
Hi, Thanks for the report. I am considering to apply the attached patch as a solution to this bug. Comments / review / tests welcome. ~Niels
>From b00bc0cbf6bffca845b3f574d7f8aa5b0dc46adb Mon Sep 17 00:00:00 2001 From: Niels Thykier <ni...@thykier.net> Date: Wed, 7 Jan 2015 21:52:45 +0100 Subject: [PATCH] Let dh_makeshlibs install shlibs files (instead of dh_installdeb) Signed-off-by: Niels Thykier <ni...@thykier.net> --- debhelper.pod | 6 ++++++ dh_installdeb | 8 +++++++- dh_makeshlibs | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/debhelper.pod b/debhelper.pod index d1624c0..6fc870e 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/dh_installdeb b/dh_installdeb index 2e4746d..b9886dc 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. +Only 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. @@ -118,7 +121,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) { doit("install","-o",0,"-g",0,"-m",644,"-p",$f,"$tmp/DEBIAN/$file"); diff --git a/dh_makeshlibs b/dh_makeshlibs index ccb73b6..08f8ff8 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,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } } + if ($shlibs_file) { + if (! -d "$tmp/DEBIAN") { + doit("install","-d","$tmp/DEBIAN"); + } + doit('install', '-o', 0, '-g', 0, '-m', 644, '-p', + $shlibs_file, "$tmp/DEBIAN/shlibs"); + } + if (-e "$tmp/DEBIAN/shlibs") { doit("chmod",644,"$tmp/DEBIAN/shlibs"); doit("chown","0:0","$tmp/DEBIAN/shlibs"); -- 2.1.4