do-release-upgrade crashes on non-ascii symbols in sources.list

Bug #1046362 reported by Mike A. Kuznetsov
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

If /etc/apt/sources.list or /etc/apt/sources.list.d/*.list files contain non-ASCII symbols in comments (like russian '# заблокировано при обновлении до precise') then do-release-upgrade fails with (was trying upgrade from 12.04 to 12.10 beta):

Traceback (most recent call last):
  File "/tmp/update-manager-D9D4d6/quantal", line 10, in <module>
    sys.exit(main())
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeMain.py", line 235, in main
    if app.run():
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 1736, in run
    return self.fullUpgrade()
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 1638, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 711, in updateSourcesList
    if not self.rewriteSourcesList(mirror_check=True):
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 686, in rewriteSourcesList
    entry.comment += " " + _("disabled on upgrade to %s") % self.toDist
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1: ordinal not in range(128)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeViewGtk3.py", line 475, in _handleException
    apport_crash(type, value, tb)
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeApport.py", line 47, in apport_crash
    _apport_append_logfiles(report)
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeApport.py", line 28, in _apport_append_logfiles
    report[f.replace(".","").replace("-","")] = (open(f), )
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 509, in __setitem__
    assert k.replace('.', '').replace('-', '').replace('_', '').isalnum()
AssertionError

Original exception was:
Traceback (most recent call last):
  File "/tmp/update-manager-D9D4d6/quantal", line 10, in <module>
    sys.exit(main())
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeMain.py", line 235, in main
    if app.run():
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 1736, in run
    return self.fullUpgrade()
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 1638, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 711, in updateSourcesList
    if not self.rewriteSourcesList(mirror_check=True):
  File "/tmp/update-manager-D9D4d6/DistUpgrade/DistUpgradeController.py", line 686, in rewriteSourcesList
    entry.comment += " " + _("disabled on upgrade to %s") % self.toDist
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1: ordinal not in range(128)

After removing non-ASCII comments updating is going fine

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: update-manager 1:0.156.14.9
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
Date: Wed Sep 5 18:52:21 2012
GsettingsChanges:
 com.ubuntu.update-manager first-run false
 com.ubuntu.update-manager launch-time 1346856324
 com.ubuntu.update-manager show-details true
 com.ubuntu.update-manager window-height 770
 com.ubuntu.update-manager window-width 1274
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
PackageArchitecture: all
SourcePackage: update-manager
UpgradeStatus: Upgraded to precise on 2012-09-05 (0 days ago)
VarLogDistupgradeAptclonesystemstate.tar.gz: Error: [Errno 13] Отказано в доступе: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
VarLogDistupgradeTermlog:

Revision history for this message
Mike A. Kuznetsov (mike4gg) wrote :
tags: added: quantal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
matthieu vidal (mvidal0001) wrote :

I can't upgrade to 12.10 beta 1 because of this bug ... I guess this problem will be critical at D-day !

Revision history for this message
matthieu vidal (mvidal0001) wrote :

I really have a problem to understand how bugs are handled here. Are they read by a human ?

I guess I will post this in october : "I told you so !!"

Revision history for this message
Swâmi Petaramesh (swami-petaramesh) wrote :

The purpose of beta releases sometimes seems to be *not to* solve critical bugs that have been identidied far ahead in time, before show time...

#lol (#me is the author of duplicate bug #1046888 )

(BTW Ubuntu seems to fsck up quite often with UTF-8... UbuntuOne doesn't like it so much either...)

Revision history for this message
Swâmi Petaramesh (swami-petaramesh) wrote :

@Matthieu : Cela dit, si tu veux upgrader, vire les commentaires accentués de tes fichiers sources.list et sources.list.d/* , et ça ira tout de suite mieux...

Revision history for this message
matthieu vidal (mvidal0001) wrote :

Lol

I know I can remove the extented characters ... but if I do such a thing ... who will remember this critical problem ?

 ^_^

Revision history for this message
matthieu vidal (mvidal0001) wrote :

it seems that this problem is gone with beta 2. I can't confirm it because I had to delete obsolete source lists.

Revision history for this message
Mike A. Kuznetsov (mike4gg) wrote :

Seems to be fixed with today's update
http://<email address hidden>/msg3832833.html

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

Other bug subscribers