*** This bug is a duplicate of bug 659738 ***
    https://bugs.launchpad.net/bugs/659738

It is not the same problem as bug #659738.

The problem here is that /usr/lib/update-notifier/update-motd-updates-
available does

    if [ "$(find "/$StateDir/$ListDir" "/$EtcDir/$SourceList" -type f -newer 
"$stamp" -print -quit)" ]; then
        NEED_UPDATE_CHECK=yes
    fi

So it checks in /var/lib/apt/lists if there are any files more newly
updated than /var/lib/update-notifier/updates-available , and if there
are it generates a new /var/lib/update-notifier/updates-available .

However, the timestamps on the files in /var/lib/apt/lists are kept in
sync with the timestamps on the mirrors, and do not indicate when an
"apt-get update" was last run. So the following can happen:

1) A new package appears on the mirrors, and the timestamp on the mirrors is 
updates
2) A new /var/lib/update-notifier/updates-available is generated on my computer
3) I run "apt-get update" on my computer

In that case, /usr/lib/update-notifier/update-motd-updates-available
will see /var/lib/update-notifier/updates-available as having a newer
timestamp than the package lists, and will therefore not update /var/lib
/update-notifier/updates-available.

The simplest fix is to have update-motd-updates-available just store the
package list directory listing with full time stamps. I have attached a
patch.

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

Title:
  motd not updating

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to