update notifier tells you to reboot before the upgrade is complete

Bug #274001 reported by Pascal d'Hermilly
38
This bug affects 3 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Fix Released
Undecided
Unassigned
update-notifier-kde (Ubuntu)
Fix Released
Medium
Harald Sitter

Bug Description

Binary package hint: update-notifier-kde

Using Intrepid Ibex

I just upgraded more than 100 packages.
However the update_notifier in KDE told me that I had to reboot long before the upgrade was done.
If I had rebooted when the update_notifier told me to, I would have interupted the upgrade process and possibly broken the package-system.

Tags: patch
Revision history for this message
Roderick B. Greening (roderick-greening) wrote :

Confirming.

The notifier needs a new check coded - it needs to go into a busy state if there is an upgrade being performed. During this, it should display a busy icon and wait for apt/adept/aptitude/synaptic processes to finish (i.e. release their lock on the package db).

Changed in update-notifier-kde:
assignee: nobody → roderick-greening
status: New → Confirmed
Revision history for this message
Pascal d'Hermilly (pascal-tipisoft) wrote :

I can confirm that this is still happening.
//Pascal

samta (samtasam)
Changed in update-notifier-kde (Ubuntu):
assignee: roderick-greening → nobody
Changed in update-notifier (Ubuntu):
status: New → Confirmed
Revision history for this message
Anders Kaseorg (andersk) wrote :

From my duplicate bug #372460: This is probably due to this absurdly small timeout in update-notifier-0.78/src/update-notifier.c:

#define TIMEOUT_APT_RUN 120 /* 120 sec */

Though even if the timeout expires, update-notifier should check to see whether a package manager is still working, instead of advising the user to immediately reboot which would forcefully abort the operation in progress.

Michael Vogt (mvo)
Changed in update-notifier (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Andreas!

I made the timeout much bigger (600s) so this should be less of a problem in the future.

For update-notifier-kde I would suggest to follow the logic that update-notifier uses and
not show the reboot required when the file appears but when the file is there and the
dpkg-run-stamp file is touched.

I attach a *UNTESTED* patch for u-n-kde, someone from the u-n-kde developers may find
it useful. It will only check for reboot required if the apt dir changed (i.e. the dpkg-run-stamp
file got touched).

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 0.86

---------------
update-notifier (0.86) karmic; urgency=low

  [ Sebastien Bacher ]
  * debian/rules:
    - build using --as-needed to reduce the depends

  [ Dustin Kirkland ]
  * debian/update-notifier-common.dirs: update-notifier-common
    needs /etc/update-motd.d, rather than /etc/update-motd.d/hourly;
    causes this directory to *not* be removed on update-motd package
    removal/upgrade

  [ Michael Vogt ]
  * src/update-notifier.c:
    - if display can not be opened, show a propper error message
      and do not crash (LP: #317745)
  * src/apt_check.py:
    - count security updates correctly even when they are "shadowed"
      by a regular update (LP: #394958)
    - fix typo (thanks to Hew McLachlan)
  * data/update-motd-updates-available, debian/99update-notifier:
    - move updates available from /var/run to /var/lib/update-notifier
      to make it persistent over reboots
  * src/update-notifier.c:
    - make the timeout for no-activity from apt bigger (LP: #274001)
  * data/update-notifier.desktop.in:
    - better description for the auto startup (LP: #146918)
  * src/update-notifier.c:
    - use GAppInfo/GAppLaunchContext to provide startup notification
      support (LP: #46258)

 -- Michael Vogt <email address hidden> Tue, 14 Jul 2009 16:50:46 +0200

Changed in update-notifier (Ubuntu):
status: Fix Committed → Fix Released
Changed in update-notifier-kde (Ubuntu):
assignee: nobody → Harald Sitter (apachelogger)
importance: Undecided → Medium
status: Confirmed → In Progress
Changed in update-notifier-kde (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier-kde - 9.10ubuntu1

---------------
update-notifier-kde (9.10ubuntu1) karmic; urgency=low

  [ Florian Reinhard ]
  * Respect kdesudo's exit code. Prevents tray icon from disappearing even
    though package installation failed for whatever reason.

  [ Harald Sitter ]
  * Bump standards version to 3.8.3
  * Add missing depends on install-package
  * Change codecTray icon form system-run to download which is much more
    suitable. This is an intermediate workaround until we can get rid of the
    tray (as seen for update notification in Kpk) (LP: #396255)
  * Invoke terminal commands using KToolInvocation rather than KProcess, regular
    cdms still get started via KProcess since we cannot use KTI for that.
    (LP: #323459)
  * Make the reboot action not act upon touches of /var/lib/update-notifier but
    once /var/lib/update-notifier/dpkg-run-stamp is touched to prevent the
    reboot icon from appearing before update is done. As suggested by Michael
    Vogt (LP: #274001)
  * Add misc:Depends for debhelper
  * Add python dependency for lintian
  * Kill original maintainer field, does not exist for native packages
  * Change maintainer from Ubuntu core dev to Kubuntu developers
  * Revise version scheme to $SERIESubuntuX (works with dch and prevents lintian
    from thinking this is a NMU)

 -- Harald Sitter <email address hidden> Thu, 01 Oct 2009 10:35:53 +0200

Changed in update-notifier-kde (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.