Duplicate of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797108 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985787
So far, my recommendation has been, that packages handle such upgrades manually.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985787#10 It's a tricky problem.Doing such upgrades automatically within i-s-h, requires that we keep additional state: Once you unpack the package and the new .service file is installed on disk, you no longer have the information what the old .service file contained.
We do kinda have this state in /var/lib/systemd/deb-systemd-*.As one of the original authors of i-s-h (well, the coding was actually done by Michael Stapelberg): we never really liked the additional bookkeeping we were doing in deb-systemd-helper and wanted to get rid of that at some point and those deb-systemd-* tools would just become very thin wrappers around systemctl.
This was one of the reasons why I was reluctant to further pursue this in #985787.
Nowadays I'm not really active anymore in systemd/i-s-h but I thought I can give you some context.
MichaelOn Fri, 13 Feb 2026 18:49:41 +0100 Alessandro Astone <[email protected]> wrote:
Package: debhelper Version: 13.24.2ubuntu1 Severity: normal Dear Maintainer,When enabling a service that specifies [Install] WantedBy=foo.target, a symlink to this service is created at /etc/systemd/system/foo.target.wants/ On package upgrade, if the service file was changed to [Install] WantedBy=bar.target, the symlink at /etc/systemd/system/foo.target.wants/ is not removed and a new symlink at /etc/systemd/system/bar.target.wants/ is not createdThis may have serious consequences depending on the rest of the contents of the unit file (e.g. it may trigger activation of other dependencies when unwanted), or in the general case users will never see the effects of the update.-- System Information: Debian Release: forky/sid APT prefers questing-updatesAPT policy: (1001, 'questing-updates'), (1001, 'questing-security'), (1001, 'questing'), (500, 'questing-proposed'), (100, 'questing-proposed'), (100, 'questing-backports')Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.17.0-12-generic (SMP w/16 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULELocale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:enShell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages debhelper depends on: ii autotools-dev 20240727.1 ii debugedit 1:5.2-3 ii dh-autoreconf 21 ii dh-strip-nondeterminism 1.14.2-1 ii dpkg 1.22.21ubuntu3.1 ii dpkg-dev 1.22.21ubuntu3.1 ii dwz 0.16-2 ii file 1:5.46-5build1 ii libdebhelper-perl 13.24.2ubuntu1 ii libdpkg-perl 1.22.21ubuntu3.1 ii man-db 2.13.1-1 ii mawk 1.3.4.20250131-1 ii perl 5.40.1-6build1 ii po-debconf 1.0.21+nmu1 debhelper recommends no packages. Versions of packages debhelper suggests: ii dh-make 2.202503 -- no debconf information
OpenPGP_signature.asc
Description: OpenPGP digital signature

