Bug#1113704: localsearch: /etc/systemd/user/gnome-session.target.wants/localsearch-3.service disappears after package rename

Vincent Lefevre vincent at vinc17.net
Thu Sep 25 03:05:21 BST 2025


On 2025-09-24 20:38:53 -0400, Jeremy Bícha wrote:
> Before today, I had not used aptitude in many years. I was unable to
> figure out how to trigger the behavior you saw with aptitude. Please
> provide detailed instructions for how to reproduce this.

First, make sure that "tracker-extract" is marked as automatically
installed. So, a package should depend on (or recommend it),
tinysparql in my case.

In aptitude's TUI:

1. Type "+" over "tracker-extract" (to upgrade the package; but then,
   aptitude notices that it can be removed).
2. Type "g".
3. Type "_" over "tracker-extract" to actually purge the removed
   package.
4. Type "g".

Or from the command line (if Aptitude::Delete-Unused is set to “true”,
which is its default):

# aptitude install --purge-unused tracker-extract
The following NEW packages will be installed:
  localsearch{a} 
The following packages will be REMOVED:
  tracker-extract{pu} 
[...]
(Reading database ... 717887 files and directories currently installed.)
Removing tracker-extract (3.8.2-4+b1) ...
Selecting previously unselected package localsearch.
(Reading database ... 717717 files and directories currently installed.)
Preparing to unpack .../localsearch_3.8.2-7_amd64.deb ...
Unpacking localsearch (3.8.2-7) ...
Setting up localsearch (3.8.2-7) ...
Processing triggers for systemd (258-1) ...
Processing triggers for man-db (2.13.1-1) ...
Processing triggers for libglib2.0-0t64:amd64 (2.84.4-3) ...
Processing triggers for libglib2.0-0t64:i386 (2.84.4-3) ...
Processing triggers for procps (2:4.0.4-9) ...
(Reading database ... 717886 files and directories currently installed.)
Purging configuration files for tracker-extract (3.8.2-4+b1) ...

In the aptitude(8) man page, there is a warning about --purge-unused,
which can cause data loss, because configuration files and other
no longer used files will be removed for packages the user has not
chosen to remove explicitly (e.g. because a "Depends" or "Recommends"
is dropped when some package is upgraded); the user needs to confirm,
though. However, a change of configuration due to a package rename
like here is completely unexpected.

> I was able to reproduce the issue with sudo apt dist-upgrade
> --auto-remove --purge. However, that is not the default or typical
> behavior for using apt and I think it could be risky to adjust
> maintainer scripts to accommodate that use case.

With apt, the purge of unused packages is normally done in 2 steps:
1. apt dist-upgrade (or "install" to upgrade just some packages);
2. apt autoremove --purge

So, in such a case, tracker-extract will first be upgraded in (1)
before being purged in (2).

With aptitude, Aptitude::Delete-Unused is true by default, so that
unused packages are removed (purged) in a single step with the
upgrade.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)



More information about the pkg-gnome-maintainers mailing list