[Bug 1707880] [NEW] newly installed additional units are not started on upgrade
Dimitri John Ledkov
launchpad at surgut.co.uk
Tue Aug 1 10:43:18 UTC 2017
Public bug reported:
Upon upgrading apt from a version that only ships apt-daily.timer to the
one that ships apt-daily.timer and apt-daily-upgrade.timer, the latter
is not started on zesty and later.
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=try-restart
else
_dh_action=start
fi
deb-systemd-invoke $_dh_action apt-daily-upgrade.timer apt-daily.timer >/dev/null || true
fi
# End automatically added section
This reduces to:
deb-systemd-invoke try-restart apt-daily-upgrade.timer apt-daily.timer >/dev/null || true
which is (after calling/checking policy-rc.d) is:
systemctl try-restart apt-daily-upgrade.timer apt-daily.timer >/dev/null || true
This is correct, for the apt-daily.timer and does nothing for the apt-
daily-upgrade.timer. Since apt-daily-upgrade.timer is not active, try-
restart does not start it.
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-upgrade.timer; then
deb-systemd-invoke start apt-daily-upgrade.timer >/dev/null || true
fi
fi
** Affects: apt (Ubuntu)
Importance: Undecided
Status: New
** Affects: debhelper (Ubuntu)
Importance: Undecided
Status: New
** Affects: apt (Ubuntu Zesty)
Importance: Undecided
Status: New
** Affects: debhelper (Ubuntu Zesty)
Importance: Undecided
Status: New
** Tags: rls-aa-incoming
** Also affects: debhelper (Ubuntu)
Importance: Undecided
Status: New
** Also affects: apt (Ubuntu Zesty)
Importance: Undecided
Status: New
** Also affects: debhelper (Ubuntu Zesty)
Importance: Undecided
Status: New
** Tags added: rls-aa-incoming
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1707880
Title:
newly installed additional units are not started on upgrade
Status in apt package in Ubuntu:
New
Status in debhelper package in Ubuntu:
New
Status in apt source package in Zesty:
New
Status in debhelper source package in Zesty:
New
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-upgrade.timer, the
latter is not started on zesty and later.
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=try-restart
else
_dh_action=start
fi
deb-systemd-invoke $_dh_action apt-daily-upgrade.timer apt-daily.timer >/dev/null || true
fi
# End automatically added section
This reduces to:
deb-systemd-invoke try-restart apt-daily-upgrade.timer apt-daily.timer >/dev/null || true
which is (after calling/checking policy-rc.d) is:
systemctl try-restart apt-daily-upgrade.timer apt-daily.timer >/dev/null || true
This is correct, for the apt-daily.timer and does nothing for the apt-
daily-upgrade.timer. Since apt-daily-upgrade.timer is not active, try-
restart does not start it.
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-upgrade.timer; then
deb-systemd-invoke start apt-daily-upgrade.timer >/dev/null || true
fi
fi
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1707880/+subscriptions
More information about the foundations-bugs
mailing list