[debhelper-devel] Bug#795193: Bug#795193: debhelper: dh_installinit --onlyscripts should generate the debhelper scripts for the first package only
Niels Thykier
niels at thykier.net
Tue Aug 11 20:41:50 UTC 2015
On 2015-08-11 18:04, Jose M Calhariz wrote:
> Package: debhelper
> Version: 9.20150628
> Severity: normal
>
Hi,
Thanks for the report.
> With source packages that generate <name>-dbg package for debug
> symbols, they generally use dh_installinit without problems. The
> debhelper scripts are generated for the first package only.
>
> But when is added the option "--onlyscripts" it generates debhelper
> scripts for both packages. This means that when installing <package>
> and <package>-dbg, it is not possible to remove <pakage>-dbg. The
> postrm script of <package>-dbg tries to remove the init script that
> belongs to <package>.
>
Indeed, this side-effect is not clearly documented and should properly
have highlighted better in the documentation.
The reason for this is that "--onlyscripts" bypasses all the regular
detection code and assumes you have installed the init script. Without
any -p (or similar) options, the tool will also assume to act on all
packages
What you want instead, is to use "-p<name>" in addition to
--onlyscripts, so dh_installinit only acts on the desired package.
> Using debhelper compatibility mode 5.
>
> This bug was reproduced using nginx package v0.7.67. From debian/rules:
>
> [...]
> dh_installinit -r --no-start --onlyscripts
> [...]
>
That is, replace the above with something like:
dh_installinit -p nginx -r --no-start --onlyscripts
On a slightly related note, in a (hopefully) not so distant future, I am
hoping to be able to retire these manual "-dbg" packages. That is,
debhelper would be able to make them automatically. In your particular
case, it would also have avoided this issue as dh_installinit would
ignore the automatically generated "-dbg" package.
Thanks,
~Niels
More information about the debhelper-devel
mailing list