Bug#797108: init-system-helpers: deb-systemd-helper doesn't remove old links when changing WantedBy= at package upgrade

Felipe Sateler fsateler at debian.org
Fri Aug 28 03:39:01 BST 2015


On 27 August 2015 at 17:19, Christian Seiler <christian at iwakd.de> wrote:
>
> Package: init-system-helpers
> Version: 1.23
> Severity: normal
> Tags: patch
>
> Dear Maintainer,
>
> if a package in version 1 had WantedBy=a.target and this is changed
> to WantedBy=b.target in version 2 of that package, deb-systemd-helper
> will properly create the links in b.target.wants/, but will not remove
> the links in a.target.wants/. Same goes with changes in Alias= and
> changes in Also=.
>
> I've attached a patch to this bug report that fixes this.
>
> Note that any additional links that were manually created by the
> administrator will not be touched, only those that were created by
> deb-systemd-helper in the first place. The only use case that is
> not covered by this patch is if an administrator wanted to keep a
> link that was auto-created (there is no way to distinguish them),
> but that seems to be quite unlikely (and the administrator could
> re-create it later - and it would then stay, even if the same
> version of the package were to be installed again - only upgrades
> will remove links).
>
> I've also attached a trivial package in two versions to test this.
> They change all 3 options (WantedBy=, Also= and Alias=) to test
> everything at the same time. Just extract the source tarballs and
> build the native packages if you want to test this.

The test packages only have test-changes.service differ, the other 2
are the same in both versions...

But I checked that the link is removed if it was existing, a new one I
created is preserved, and if I remove an enable link, then the
disabled state is preserved to the new name (ie, when moving from
targetA to targetB if I disable in targetA then it won't be enabled in
targetB).

However, (and I don't know if this is new or not), the state does not
seem to be removed on package purge: I removed a target, purged the
package, then reinstalled the package and the enable link was not
generated.


-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list