[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem with dh_installsystemd scripts on packages providing the same systemd service



On Tue, 9 Mar 2021 23:22:50 +0100
Santiago Garcia Mantinan <manty@debian.org> wrote:

> Hi!

Hi!

> 
> if [ "$1" = "purge" ] && ! [ -e /etc/init.d/squid ]; then
> if [ "$1" = "purge" ] && ! [ -e /lib/systemd/system/squid.service ];
> then
> 
> I have tested this on squid and it works ok.
> 

It looks you are breaking purge for the regular case, at least for
sysvinit users. If a user has only one of your package installed, how
the removal of the init script is going to happen?
For the sysvinit script I think you need to check for something that is
not a conf file and both of your packages ships.

> Or should I try to fix this on squid? If so... how?

Since both are providing Squid3 I'm not sure but is it feasible to
change the name of the unit and the sysvscript in one of the two
packages? 
If not, you can tell debhelper to not edit the maintscripts, and then
do some copy-paste. See dh_installinit --no-scripts and
dh_installsystemd 'unit file'.

Oh, I'm not an experienced packager so maybe it's better to wait for
other suggestions.

Regards,
Lorenzo


Reply to: