upgrade from trusty to utopic failed

Bug #1321959 reported by Serge Hallyn
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray

Bug Description

A fatal error occurred

Please report this as a bug and include the files
/var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
your report. The upgrade has aborted.
Your original sources.list was saved in
/etc/apt/sources.list.distUpgrade.

Traceback (most recent call last):

File "/tmp/ubuntu-release-upgrader-nyys21ya/utopic", line 8, in
<module>
sys.exit(main())

File
"/tmp/ubuntu-release-upgrader-nyys21ya/DistUpgrade/DistUpgradeMain.py",
line 239, in main
if app.run():

File
"/tmp/ubuntu-release-upgrader-nyys21ya/DistUpgrade/DistUpgradeController.py",
line 1820, in run
return self.fullUpgrade()

File
"/tmp/ubuntu-release-upgrader-nyys21ya/DistUpgrade/DistUpgradeController.py",
line 1722, in fullUpgrade
if not self.doUpdate():

File
"/tmp/ubuntu-release-upgrader-nyys21ya/DistUpgrade/DistUpgradeController.py",
line 928, in doUpdate
"connection and retry."), "%s" % e)

UnboundLocalError: local variable 'e' referenced before assignment

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Note it left my /etc/apt/sources.list with utopic.

(I was going to just upgrade by hand anyway so will proceed with that, but thought I ought to file this bug)

Revision history for this message
Brian Murray (brian-murray) wrote :

I'm fairly certain that the issue with extras.ubuntu.com is a known bug, so let's just address the issue of the traceback with this bug report.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:14.10.5

---------------
ubuntu-release-upgrader (1:14.10.5) utopic; urgency=medium

  [ Brian Murray ]
  * DistUpgrade/DistUpgradeController.py:
    - ensure that error variable is empty if not set (LP: #1321959)

  [ Michael Vogt ]
  * pep8 fixes to fix autopkgtest failure about the new E265
    error condition
 -- Michael Vogt <email address hidden> Thu, 26 Jun 2014 08:44:33 +0200

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Gabriel de Perthuis (g2p) wrote :

This fix doesn't work; the `if not e` check throws UnboundLocalError if e is not defined at all.
I worked around it by changing the check to `if 'e' in locals() and e:`.

Revision history for this message
Jarl (jarl-dk) wrote :

This is not fixed and has been there for a long time. Please reopen bug.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@jarl-dk

could you please attach a patch to show exactly where you needed to change DistUpgrade/DistUpgradeController.py ?

All uses of e seem to be in a 'except OSError as e' section so that case should not be possible.

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
status: Fix Released → Confirmed
status: Confirmed → Incomplete
peterstan (stasnel)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → 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.