diff -Nru update-notifier-0.150/debian/changelog update-notifier-0.151/debian/changelog --- update-notifier-0.150/debian/changelog 2014-01-08 13:36:58.000000000 -0500 +++ update-notifier-0.151/debian/changelog 2014-01-11 09:28:44.000000000 -0500 @@ -1,3 +1,10 @@ +update-notifier (0.151) trusty; urgency=low + + * If there are no updates available, still nag the user if a reboot is + required, in case the notification window was dismissed. (LP: #1033226) + + -- Marc Deslauriers Sat, 11 Jan 2014 09:28:25 -0500 + update-notifier (0.150) trusty; urgency=low * Update the location of apport/autoreport from /etc to /var/lib. diff -Nru update-notifier-0.150/src/update.c update-notifier-0.151/src/update.c --- update-notifier-0.150/src/update.c 2013-07-12 13:07:51.000000000 -0400 +++ update-notifier-0.151/src/update.c 2014-01-11 09:35:47.000000000 -0500 @@ -399,8 +399,8 @@ time_t last_launch) { - // no security updates - if (priv->num_security == 0) + // no security updates and no reboot pending + if ((priv->num_security == 0) && !priv->reboot_pending) return FALSE; // security updates, but already launched recently @@ -550,6 +550,7 @@ priv->num_upgrades = 0; priv->num_security = 0; + priv->reboot_pending = FALSE; int exit_status = 0; GError *error = NULL; @@ -558,6 +559,7 @@ UPGRADE_CHECKER, NULL }; char *ret; + struct stat buf; if(g_spawn_sync(NULL, cmd, NULL, G_SPAWN_STDOUT_TO_DEV_NULL, @@ -615,10 +617,13 @@ g_debug_update("%s returned %i (security: %i)", UPGRADE_CHECKER, priv->num_upgrades, priv->num_security); - if (priv->num_upgrades == 0) { + if (stat("/var/run/reboot-required", &buf) == 0) { + priv->reboot_pending = TRUE; + g_debug_update("A reboot is currently pending."); + } + if ((priv->num_upgrades == 0) && !priv->reboot_pending) { // check if the periodic file is very old - struct stat buf; if ((stat("/var/lib/apt/periodic/update-success-stamp", &buf) == 0) && (time(NULL) - buf.st_mtime > OUTDATED_NAG_AGE) ) g_timeout_add_seconds(OUTDATED_NAG_WAIT, (GSourceFunc)outdated_nag, ta); diff -Nru update-notifier-0.150/src/update.h update-notifier-0.151/src/update.h --- update-notifier-0.150/src/update.h 2013-07-12 13:07:51.000000000 -0400 +++ update-notifier-0.151/src/update.h 2014-01-11 09:21:40.000000000 -0500 @@ -18,4 +18,5 @@ int num_upgrades; int num_security; + gboolean reboot_pending; };