[Bug 918656] Re: Getting update notifications although up-to-date via aptitude

Dominique Brazziel 918656 at bugs.launchpad.net
Fri Mar 23 15:36:29 UTC 2012


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

I've noticed the 'update-success-stamp' time being updated at two times
during the day:

1)  After '/etc/cron.daily/apt' runs (between 4:30 and 5pm on my system).  At this time the timestamp matches that of '/var/lib/apt/periodic/update-stamp.
2)  Early in the morning, about 12 hours later, and it seems to be triggered by packagekit, which is configured to check for updates once a day and to only install security updates (see 'gpk-prefs').  I will check to see if turning off the packagekit updates stops the additional update checks from running.  Evidence of past update-notifier/apt/packagekit activity is in the output of 'lastcomm | grep apt-check' (also, look for packagekitd finishing after the apt-check').   Another way to see what is happening in rael time is to add the '--debug updates' and '--debug inotify' flags to update-notifier 

 The methodology of update-notifier (and packagekit) regarding the
security updates seems to be to try and run when the system is 'idle',
and there are a lot of  notations in the update-notifiier source.  The
cause of getting notifications even though the system is up to date is
due to the 'update-success-stamp' being more than 7 days old.  See
u-n/src/update.c function 'outdated_nag', which is called from function
'update_check()':

static gboolean
outdated_nag(TrayApplet *ta)
{
   struct stat buf;
   if ((stat("/var/lib/apt/periodic/update-success-stamp", &buf) == 0) &&
       (time(NULL) - buf.st_mtime > OUTDATED_NAG_AGE) ) {
      gtk_status_icon_set_visible (ta->tray_icon, TRUE);
      ta->name = "gtk-dialog-warning-panel";
      GdkPixbuf *src = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),
                                                ta->name, 48, 
                                                GTK_ICON_LOOKUP_GENERIC_FALLBACK, 
                                                NULL);
      gtk_status_icon_set_from_pixbuf(ta->tray_icon, src);
      g_object_unref(src);
      gtk_status_icon_set_tooltip(ta->tray_icon,
                                  _("The update information is outdated. "
                                    "This may be caused by network "
                                    "problems or by a repository that "
                                    "is no longer available. "
                                    "Please update manually "
                                    "by clicking on this icon and then "
                                    "selecting 'Check for updates' and "
                                    "check if some of the listed "
                                    "repositories fail."
                                 ));
   }
   return FALSE;
}

I think if '/var/lib/apt/periodic/update-success-stamp' is touched to bring it up to date (i.e. less than 7 days old) the nag message goes away.
If '/etc/cron.daily/15update-stamp' is changed to not reference '/var/lib/apt/update-success-stamp' that would break some checks in update-notifier/
See the aforementioned 'update-c' and 'update-notifier.c'.

-- 
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/918656

Title:
  Getting update notifications although up-to-date via aptitude

Status in aptitude:
  Fix Committed
Status in “update-notifier” package in Ubuntu:
  New

Bug description:
  I'm getting notifications that my system and/or the package list is
  not up-to-date every few days via the Gnome panel, although I'm
  running aptitude regularly to update the package list *and* the
  system.

  After looking around a bit, I guess the culprit is the file
  /etc/apt/apt.conf.d/15update-stamp, which touches
  /var/lib/apt/periodic/update-success-stamp, while /etc/cron.daily/apt
  checks the age of the file /var/lib/apt/periodic/update-stamp (without
  "success-").

  This makes this cron script wrongly think that an update is needed.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: update-notifier-common 0.117ubuntu3.1
  ProcVersionSignature: Ubuntu 3.0.0-14.23-server 3.0.9
  Uname: Linux 3.0.0-14-server x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 1.23-0ubuntu4
  Architecture: amd64
  Date: Thu Jan 19 13:26:24 2012
  PackageArchitecture: all
  SourcePackage: update-notifier
  UpgradeStatus: No upgrade log present (probably fresh install)
  modified.conffile..etc.apt.apt.conf.d.10periodic:
   APT::Periodic::Download-Upgradeable-Packages "0";
   APT::Periodic::Unattended-Upgrade "0";
   APT::Periodic::Update-Package-Lists "7";
  mtime.conffile..etc.apt.apt.conf.d.10periodic: 2012-01-19T12:25:51.616232

To manage notifications about this bug go to:
https://bugs.launchpad.net/aptitude/+bug/918656/+subscriptions




More information about the foundations-bugs mailing list