Bug#1125017: init-system-helpers: "dpkg --purge tracker-extract" removes a symlink from package localsearch
Michael Biebl
biebl at debian.org
Thu Jan 8 20:40:02 GMT 2026
On Thu, 8 Jan 2026 13:56:44 +0100 Vincent Lefevre <vincent at vinc17.net>
wrote:
> Package: init-system-helpers
> Version: 1.69
> Severity: grave
> Justification: causes non-serious data loss
>
> Package tracker-extract has been renamed to localsearch.
> So when upgrading, localsearch is installed and tracker-extract
> removed. But when I do "dpkg --purge tracker-extract" to completely
> get rid of tracker-extract, this removes the
>
> /etc/systemd/user/gnome-session.target.wants/localsearch-3.service
>
From what I understand, the problem is this:
The tracker-extract package originally shipped a file
/usr/lib/systemd/user/tracker-extract-3.service
which was then renamed to
/usr/lib/systemd/user/localsearch.service when upstream renamed the
project.
Later, the tracker-extract binary package was renamed to localsearch and
during the upgrade the tracker-extract package was removed (but not
purged), i.e. the maintainer scripts of tracker-extract remained
installed and they contained code to remove
/etc/systemd/user/gnome-session.target.wants/localsearch-3.service
More specifically tracker-extract.postrm contains
deb-systemd-helper --user purge 'localsearch-3.service'
which is triggered on "purge"
The problem is, that both the tracker-extract and localsearch package
reference the same service file.
To avoid that situation, the tracker-extract package should have been
renamed at the same time the service file was renamed. So I'd argue this
is a bug in the tracker-extract/localsearch package in how they handled
the transition.
But I guess it's too late for that now.
I see two possible solutions:
a/ we introduce some kind of refcounting/package ownership in
dh_installsystemduser/init-system-helpers for packages which install the
same service file. And only if the refcount drops to zero the symlink is
removed (only a rough idea, would need some further thought)
Sounds non-trivial to me and more importantly, we can't retroactively
fix tracker-search/localsearch
b/ the localsearch package neuters the tracker-extract postrm maintainer
scripts
A small variation of b/: The localsearch package explicitly purges the
tracker-search state before installing its own symlinks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20260108/434cb84b/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list