newly installed additional units are not started on upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Zesty |
New
|
Undecided
|
Unassigned | ||
Artful |
New
|
Undecided
|
Unassigned | ||
debhelper (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Zesty |
New
|
Undecided
|
Unassigned | ||
Artful |
New
|
Undecided
|
Unassigned |
Bug Description
Upon upgrading apt from a version that only ships apt-daily.timer to the one that ships apt-daily.timer and apt-daily-
I believe this may be a bug in dh_systemd_start:
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then
_dh_action=
else
_dh_action=start
fi
deb-systemd-invoke $_dh_action apt-daily-
fi
# End automatically added section
This reduces to:
deb-systemd-invoke try-restart apt-daily-
which is (after calling/checking policy-rc.d) is:
systemctl try-restart apt-daily-
This is correct, for the apt-daily.timer and does nothing for the apt-daily-
Imho, there should be an extra snippet in apt.postinst which does this:
if [ -d /run/systemd/system ]; then
if dpkg --compare $2 with version that introduces apt-daily-
fi
fi
Or as per adam. If the deb-systemd-invoke tracks magic state at install time, and knows which units are brand new, it should do start on those, and retry-start on the known updated units.