Bug#1031295: pcp fails to install without systemd

2023-02-16 Thread Andras Korn
Hi,

it seems to me that in postinst, instead of

if $do_systemd
then
systemctl start pmcd.service >/dev/null
systemctl start pmlogger.service >/dev/null
elif which invoke-rc.d >/dev/null 2>&1
then
invoke-rc.d pmcd start
invoke-rc.d pmlogger start
else
/etc/init.d/pmcd start
/etc/init.d/pmlogger start
fi

You could just do

service pmcd start
service pmlogger start

Additionally, I think a case can be made for ignoring failures to start these 
services in postinst. If the package fails to configure, that'll break 
unattended-upgrades which will then also not install security updates.

AndrĂ¡s

-- 
   A hangover: the wrath of grapes.



Bug#1031295: pcp fails to install without systemd

2023-02-14 Thread Adrian Bunk
Package: pcp
Version: 6.0.2-1
Severity: serious

https://piuparts.debian.org/sid/fail/pcp_6.0.2-1.log

...
Setting up pcp (6.0.2-1) ...
  /var/lib/dpkg/info/pcp.postinst: 242: systemctl: not found
  dpkg: error processing package pcp (--configure):
   installed pcp package post-installation script subprocess returned error 
exit status 127
  Processing triggers for libc-bin (2.36-8) ...
  Errors were encountered while processing:
   pcp
  E: Sub-process /usr/bin/dpkg returned an error code (1)