UnicodeDecodeError in checkFreeSpace on 13.10=>14.04 upgrade

Bug #1325418 reported by Odin Hørthe Omdal
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
New
Undecided
Unassigned

Bug Description

Steps:

 1. Use a locale that has an LC_NUMBER with a no-breaking space (or some other non-ascii character)
 2. Have too little space on one mount (for me it was /boot)
 3. Can't do release upgrade to 14.04 (well, not getting any error message)

I sent a patch upstream[0], but I don't know if it'll be accepted, and also, this won't really help unless the package is updated on the versions people upgrade from.

  [0] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750120>

I suggest instead that you code around it in the trusty upgrade script. The offending line is the apt_pkg.size_to_str(). Instead of using that bare, you should prepend a `.decode('utf-8')` to it.

I don't know where the code for that trusty tarball is held, so I don't have a patch. But I can do that if you tell me where. (should be a simple fix though).

-------

Some relevant log lines (and traceback) from this discussion <http://ubuntuforums.org/showthread.php?t=2217609> (more data there)

2014-04-18 08:44:07,527 DEBUG dir '/var/cache/apt/archives' needs '1085247820' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (1245708288.000000)
2014-04-18 08:44:07,527 DEBUG dir '/usr' needs '1768633344' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (160460468.000000)
2014-04-18 08:44:07,528 DEBUG dir '/usr' needs '52428800' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (-1608172876.000000)
2014-04-18 08:44:07,528 DEBUG dir '/boot' needs '47136438' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (-1660601676.000000)
2014-04-18 08:44:07,528 DEBUG dir '/tmp' needs '5242880' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (-1707738114.000000)
2014-04-18 08:44:07,529 DEBUG dir '/' needs '10485760' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (-1712980994.000000)
2014-04-18 08:44:07,529 DEBUG dir '/tmp' needs '0.0' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (-1723466754.000000)
2014-04-18 08:44:07,529 DEBUG dir '/usr' needs '0.0' of '<DistUpgrade.DistUpgradeCache.FreeSpace object at 0x991214c>' (-1723466754.000000)
2014-04-18 08:44:07,530 ERROR Not enough free space: ['/']
2014-04-18 08:44:07,543 ERROR not handled exception:
Traceback (most recent call last):

  File "/tmp/update-manager-WBPSvW/trusty", line 10, in <module>
    sys.exit(main())

  File "/tmp/update-manager-WBPSvW/DistUpgrade/DistUpgradeMain.py", line 243, in main
    if app.run():

  File "/tmp/update-manager-WBPSvW/DistUpgrade/DistUpgradeController.py", line 1827, in run
    return self.fullUpgrade()

  File "/tmp/update-manager-WBPSvW/DistUpgrade/DistUpgradeController.py", line 1780, in fullUpgrade
    if not self.askDistUpgrade():

  File "/tmp/update-manager-WBPSvW/DistUpgrade/DistUpgradeController.py", line 988, in askDistUpgrade
    if not self._checkFreeSpace():

  File "/tmp/update-manager-WBPSvW/DistUpgrade/DistUpgradeController.py", line 965, in _checkFreeSpace
    required.dir))

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1: ordinal not in range(128)

Tags: dist-upgrade
tags: added: dist-upgrade
Revision history for this message
Brian Murray (brian-murray) wrote :

Oh this may be the same bug as bug 1172740.

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

You could test the fix by using the -p switch with do-release-upgrade.

Revision history for this message
Odin Hørthe Omdal (velmont) wrote :

Indeed it is a duplicate. The fix is just the hotfix I'd done myself if having that problem.

I'll link the debian bug in a comment on the other bug.

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.