Ticket #2491 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

updater doesn't update on Fedora 14

Reported by: walter Owned by: mchua pbrobinson sdz
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
Component: sugar Version: Git as of bugdate
Severity: Unspecified Keywords: r?
Cc: rgs Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description (last modified by walter) (diff)

The CP updater searches for and properly identifies bundles to update, but then it fails to display the dialog that enables you to proceed with the update.

Haven't tried this on other OSs, but it fails in SoaS, sugar-jhbuild, and the sugar-emulator installed with yum on F14.

The problem is with the call to locale.format in view.py in the updater:

The problem is with line 391 in _format_size()

return locale.format(_('%.1f MB'), size / 1024.0 / 1024)

locale.format doesn't seem to like '%f x' as seen in the code snippet below.

import locale
locale.format('%f MB', 123)

Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/locale.py", line 189, in format

"format specifier, %s not valid") % repr(percent))

ValueError: format() must be given exactly one %char format specifier, '%f MB' not valid

Attachments

0001-Workaround-to-Python-2.7-regression-in-locale.format.patch Download (1.1 KB) - added by walter 2 years ago.
using format_string()

Change History

Changed 3 years ago by satellit

duplicate?  http://bugs.sugarlabs.org/ticket/2339

I wonder if pop up window with results of update inquiry is hidden behind updater window

Changed 2 years ago by walter

  • component changed from SoaS to sugar
  • description modified (diff)
  • summary changed from updater doesn't update on Mango (SoaS 4) to updater doesn't update on Fedora 14

Changed 2 years ago by walter

Will

return _('%s MB') % (locale.format('%.1f', size / 1024.0 / 1024))

accomplish the desired result? This works properly for en_US.utf8

Changed 2 years ago by walter

Note that there is a similar problem on line 388.

return locale.format(_('%.0f KB'), size / 1024.0)

Changed 2 years ago by walter

  • cc rgs added

rgs found the relevant bug report:  https://bugs.launchpad.net/update-manager/+bug/673297

I'll prepare a patch

Changed 2 years ago by walter

  • keywords r? added

Changed 2 years ago by walter

using format_string()

Changed 2 years ago by walter

As per  http://lists.sugarlabs.org/archive/sugar-devel/2010-November/028957.html the patch now uses locale.format_string()

Tested on F14 with Python 2.7 and F13 with Python 2.6

Changed 2 years ago by walter

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.