Opened 14 years ago

Closed 13 years ago

#2491 closed defect (fixed)

updater doesn't update on Fedora 14

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

Description (last modified by walter)

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 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/", 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 (1)

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

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by satellit


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

comment:2 Changed 13 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

comment:3 Changed 13 years ago by walter


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

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

comment:4 Changed 13 years ago by walter

Note that there is a similar problem on line 388.

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

comment:5 Changed 13 years ago by walter

  • Cc rgs added

rgs found the relevant bug report:

I'll prepare a patch

comment:6 Changed 13 years ago by walter

  • Keywords r? added

Changed 13 years ago by walter

using format_string()

comment:7 Changed 13 years ago by walter

As per the patch now uses locale.format_string()

Tested on F14 with Python 2.7 and F13 with Python 2.6

comment:8 Changed 13 years ago by walter

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