[Bug 1563854] [NEW] update-notifier updates-available does not reset after dpkg run

Stefan Bader stefan.bader at canonical.com
Wed Mar 30 13:07:16 UTC 2016


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
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1563854

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

Status in update-notifier package in Ubuntu:
  New

Bug description:
  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.

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



More information about the foundations-bugs mailing list