update-manager should trap ctrl-c

Bug #90866 reported by Barry Warsaw
4
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

I was upgrading from edgy to feisty with "update-manager -d -c" and accidentally hit C-c in the terminal. I dialog came up saying A fatal error occurred, with this contents:

Traceback (most recent call last):

  File "/tmp/tmpKwBdP3/DistUpgradeViewGtk.py", line 116, in stop
    def stop(self):

KeyboardInterrupt

Revision history for this message
Barry Warsaw (barry) wrote :
Revision history for this message
Barry Warsaw (barry) wrote :
Michael Vogt (mvo)
Changed in update-manager:
status: Unconfirmed → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote : Re: update-manager VTE should trap ctrl-c

Thanks for your bugreport.

Just to clarify. You hit it inside the terminal that you started update-manager in? Or inside the terminal that displays the install progress when update-manager performs the upgrade?

Thanks,
 Michael

Changed in update-manager:
status: Confirmed → Needs Info
Revision history for this message
Barry Warsaw (barry) wrote :

Hi Michael. I hit C-c inside the terminal that I started update-manager in.

Michael Vogt (mvo)
Changed in update-manager:
status: Needs Info → Confirmed
Tollef Fog Heen (tfheen)
Changed in update-manager:
assignee: nobody → mvo
Revision history for this message
Michael Vogt (mvo) wrote :

I tried adding something like:

signal.signal(SIGINT, SIG_IGN)

but it seem that this does not fix the case when libapt runs one of its helpers (e.g. http fetching is a seperate process). The signal still reaches the child and that dies then (no idea why, the child should inherit the parenty signal mask).

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport and sorry that it took so long for me to get around fixing it.

This is fixed now in my bzr tree, if ctrl-c is pressed, a dialog is presented that warns about the consequences and offers to cancel the ctrl-c sending.

Changed in update-manager:
importance: Undecided → Medium
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.93.2

---------------
update-manager (1:0.93.2) intrepid; urgency=low

  * DistUpgrade/DistUpgradeCache.py:
    - work around problem with packages with no priority
      (LP: #253255)
  * DistUpgrade/DistUpgradeViewGtk.py:
    - detect ctrl-c presses in the terminal and warn the
      user that it will kill the upgrade (LP: #90866)
  * DistUpgrade/DistUpgrade.cfg:
    - when being run by the sandbox-upgrader, do not
      reboot automatically after the upgrade finished
  * DistUpgrade/DistUpgradeController.py:
    - when a upgrade is cancelt due to network errors,
      inform that the downloaded files will be kept
      (LP: #242111)

 -- Michael Vogt <email address hidden> Tue, 05 Aug 2008 20:37:52 +0200

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

Other bug subscribers

Remote bug watches

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