Public bug reported:

>From /etc/apt/apt.conf.d/99update-notifier the script /usr/lib/update-
notifier/update-motd-updates-available is started on a successful "apt-
get update" run. It will update /var/lib/update-notifier/updates-
available with the number of new packages that are installable (and this
is inserted into the dynamic motd which is shown on every login).

In the past /var/lib/update-notifier/updates-available was replaced by
an empty line from the Dpkg::post-invoke hook. This is missing in
Xenial, so motd will incorrectly claim to have installable packages
until there are again new ones after a updating the apt cache.

Delta in /etc/apt/apt.conf.d/99update-notifier:
-DPkg::Post-Invoke {"if [ -d /var/lib/update-notifier ]; then touch 
/var/lib/update-notifier/dpkg-run-stamp; fi; if [ -e 
/var/lib/update-notifier/updates-available ]; then echo > 
/var/lib/update-notifier/updates-available; fi "; };
+DPkg::Post-Invoke {"if [ -d /var/lib/update-notifier ]; then touch 
/var/lib/update-notifier/dpkg-run-stamp; fi";};
+APT::Update::Post-Invoke-Success 
{"/usr/lib/update-notifier/update-motd-updates-available 2>/dev/null || true";};

It looks like before the file was re-created by update-motd on every
login. And maybe while moving this to post-apt-get-update the reset was
dropped.

** Affects: update-notifier (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1563854

Title:
  update-notifier updates-available does not reset after dpkg run

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1563854/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to