[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#862001: libapt-pkg5.0: Failed to try-restart apt-daily-upgrade.timer: Unit apt-daily-upgrade.timer not found.



Le 07/05/17 à 12:16, Julian Andres Klode a écrit :
Control: found -1 1.4~beta1

On Sun, May 07, 2017 at 11:30:04AM +0200, Laurent Bigonville wrote:
Package: libapt-pkg5.0
Version: 1.4.2
Severity: serious

Hi,

When upgrading my system today I saw the following line in the output:

Dépaquetage de libapt-pkg5.0:amd64 (1.4.2) sur (1.4.1) ...
Paramétrage de libapt-pkg5.0:amd64 (1.4.2) ...
Failed to try-restart apt-daily-upgrade.timer: Unit apt-daily-upgrade.timer not found.
Does this cause the installation to fail for you, or why is
that serious?

The same issue also happens in 1.4~beta1, although only for the
apt-daily timer (I guess nobody noticed it because everyone already
had the timer installed at that point, so nobody noticed it).
If you for example uninstall apt-doc (or any other packages) the .timer unit will be stopped too, this is not a good idea and this needs to be fixed before the release IMHO.


It seems that the libapt-pkg5.0 postinst script contains the following
snippet but that the apt-daily-upgrade.timer and apt-daily.timer are not
shipped in that package (they are in apt package instead):

# 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
Oh, I thought dh_systemd would be clever enough to fix this.

Your patch is about right, I think we should call

     dh_systemd_start --remaining-packages

afterwards, though (in case we add a unit elsewhere).

I don't think it's 100% necessary as there are no other .service files shipped by apt binary packages but it might be good for consistency.


Reply to: