Skip to content

d-s-h: break infinite recursion on symlinks

Also= can refer to anything, and directly or indirectly we might end up back to the original unit, causing a loop and an infinite recursion which causes deb-systemd-helper to exit without creating its state. Remember which unites were visited before recursing.

$ sudo apt install systemd-homed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  systemd-homed
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 471 kB of archives.
After this operation, 1,172 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian testing/main amd64 systemd-homed amd64 251.2-7 [471 kB]
Fetched 471 kB in 0s (5,096 kB/s)
Selecting previously unselected package systemd-homed.
(Reading database ... 534938 files and directories currently installed.)
Preparing to unpack .../systemd-homed_251.2-7_amd64.deb ...
Unpacking systemd-homed (251.2-7) ...
Setting up systemd-homed (251.2-7) ...
Created symlink /etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service → /lib/systemd/system/s
ystemd-homed-activate.service.
Created symlink /etc/systemd/system/dbus-org.freedesktop.home1.service → /lib/systemd/system/systemd-homed.service.
Created symlink /etc/systemd/system/multi-user.target.wants/systemd-homed.service → /lib/systemd/system/systemd-homed.
service.
Processing triggers for dbus-broker (31-1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.14.0-1) ...
$ find /etc/systemd -name *home*
/etc/systemd/homed.conf
/etc/systemd/system/multi-user.target.wants/systemd-homed.service
/etc/systemd/system/dbus-org.freedesktop.home1.service
/etc/systemd/system/systemd-homed.service.wants
/etc/systemd/system/systemd-homed.service.wants/systemd-homed-activate.service
$ sudo apt purge systemd-homed
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  systemd-homed*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1,172 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 534960 files and directories currently installed.)
Removing systemd-homed (251.2-7) ...
Processing triggers for dbus (1.14.0-1) ...
Processing triggers for dbus-broker (31-1) ...
Processing triggers for man-db (2.10.2-1) ...
(Reading database ... 534938 files and directories currently installed.)
Purging configuration files for systemd-homed (251.2-7) ...
$ find /etc/systemd -name *home*
$

Closes: #1014119

Edited by Luca Boccassi

Merge request reports

Loading