#1145117 deb-systemd-helper: deb-systemd-helper: preserve links to existing units during purge

#1145117#5
Date:
2026-08-22 22:53:15 UTC
From:
To:
Dear Maintainer,

    I have 2 packages that provide that same systemd unit file
    and when I try to replace one by the other, the systemd unit
    becomes disabled since the link has been removed on the purge
    of the second package.

    The current behavior of deb-systemd-helper purge:

    If the unit files are provided by 2 packages (that Replaces and
    Conflicst each other). Purging the first package while the second
    is install removes all the links and break the first package.

    This commit propose a more conservative purging behavior by
    keeping symlinks during purge when their target unit file still exists,
    preventing one package's purge from disabling a unit still provided
    by another installed package.

  *  deb-systemd-helper: preserve links to existing units during purge


Thanks for considering the patch.