Hi Michael, >daemon-reload is a costly operation, so we should try to avoid calling it too excessively. > >So I'm not convinced it is a good idea to generate a daemon-reload (via dh_installsystemd in postinst) for packages which do not actually (re)start a unit as part of the upgrade process. > >By using "--no-enable --no-start" you are basically leaving the management of the life cycle of the service entirely to the administrator. Wouldn't you agree? > >Shouldn't the administrator then call "systemctl daemon-reload" as well? >systemd will even warn him in cases a .service file has changed (which thankfully doesn't happen too often) > >Is this actually an issue in practice? Do you have bug reports where users of your xpra package have asked for this?
I realize daemon-reload is a costly operation, and I also realize the unit in question is used by proxy module of Xpra, which is optional. That's why Dmitry intentionally left it for system administrators to configure. Your point that typically units are not changed daily is also perfectly valid. However, speaking of "Shouldn't the administrator then call "systemctl daemon-reload" as well?"… No, if one uses unattended-upgrades or any other automation like auter or puppet etc. Server gets rebooted or service gets restarted and start-up fails due to requirement of "daemon-reload" or worse, starts with previous configuration which fails too. What I suggest is slightly different Debian-wise. We do have list of conffiles and list of files installable by the package. What prevents us from scanning the list for known locations of systemd units ({/usr}/lib/systemd/{system,user}?) and compare them by hash or by diff just like we do it with conffiles? If the units, timers, etc differ, we call daemon-reload and issue a warning to stderr so both user or script catches it. Of course it may need some additions to dpkg and debhelper (or to plain debhelper only?) but this issue will be eradicated for all packages rebuilt after the update. Of course I can implement the same check in postinst script of Xpra, but I decided to discuss my idea with involved colleagues. What do you think? -- Vasyl Gello ================================================== Certified SolidWorks Expert Mob.:+380 (98) 465 66 77 E-Mail: vasek.ge...@gmail.com Skype: vasek.gello ================================================== 호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다