[lucid] program crashes when string "%s ago" is displayed

Bug #569469 reported by Pavol Klačanský
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
language-pack-sk (Ubuntu)
Fix Released
Undecided
Unassigned
update-manager (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: update-manager

pk@pk-laptop:~$ update-manager
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 105, in <module>
    app.main(options)
  File "/usr/lib/python2.6/dist-packages/UpdateManager/UpdateManager.py", line 963, in main
    self.fillstore()
  File "/usr/lib/python2.6/dist-packages/UpdateManager/UpdateManager.py", line 810, in fillstore
    self.update_count()
  File "/usr/lib/python2.6/dist-packages/UpdateManager/UpdateManager.py", line 515, in update_count
    if self._get_last_apt_get_update_text() is not None:
  File "/usr/lib/python2.6/dist-packages/UpdateManager/UpdateManager.py", line 483, in _get_last_apt_get_update_text
    ago_hours) % ago_hours
TypeError: not all arguments converted during string formatting

https://translations.launchpad.net/ubuntu/lucid/+source/update-manager/+pots/update-manager/sk/+translate?batch=10&show=all&search=ago

we don't have "1 hour ago" but "a hour ago", or "1 day ago" => "yesterday"
but when "%s" is missing, update-manager crashes on startup

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: update-manager 1:0.134.7
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
Architecture: amd64
Date: Sat Apr 24 18:08:42 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=sk_SK:sk:en_GB:en
 PATH=(custom, user)
 LANG=sk_SK.utf8
 SHELL=/bin/bash
SourcePackage: update-manager

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :
Revision history for this message
Martijn_Hoekstra (martijnhoekstra) wrote :

Sorry if I'm doing this all wrong, I'm new to Python, Ubuntu Bugfixes, and Interface/Translation things. And this is all of the above. I believe this is not only a valid problem, but also that the proposed translation is better than what we have now in English.

It seems silly to pass a format parameter where you know it is 1 to begin with, but this patch introduces a new problem: If this would be accepted (and fixed, I'm sure I messed something up somewhere), it would need new translations too, because now we lost the %S that broke SK_sk, but that most other languages probably depend on.

Revision history for this message
Michael Vogt (mvo) wrote :

I commited a fix for this to trunk/ but it will be a string change so its not really suitable for lucid (unless a lot of manual string unfuzzying is done).

Changed in update-manager (Ubuntu):
importance: Undecided → Medium
status: New → Fix Committed
Lorenzo De Liso (blackz)
tags: added: patch
Revision history for this message
malev (marcosvanetta) wrote :

tags: patch-rejected

Another fix for this issue has been commit already

tags: added: patch-rejected
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.140

---------------
update-manager (1:0.140) maverick; urgency=low

  * DistUpgrade/removal_blacklist.cfg:
    - remove gobuntu-desktop from the removal blacklist
  * DistUpgrade/DistUpgradeController.py:
    - start apport only, do not modify any conffile (all versions
      of apport we upgrade from support this now)
  * UpdateManager/UpdateManager.py:
    - fix crash when format string has the wrong number of arguments
      (LP: #569469)
    - fix minor UI resize issue (LP: #572228)
  * DistUpgrade/DistUpgrade.cfg:
    - add ubuntu-netbook (LP: #574279)
  * UpdateManager/Core/MetaRelease.py:
    - add looking for a "UpgradeBroken" tag that contains a reason string
      if the user should not be allowed to perform a release upgrade
  * UpdateManager/UpdateManager.py, do-release-upgrade:
    - honor "UpgradeBroken" flag and error in this case
  * updated to support lucid to maverick upgrades
 -- Michael Vogt <email address hidden> Tue, 25 May 2010 10:48:27 +0200

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.