I just corrected Ubuntu 5.10 to 15.10 in my description. Sorry.
I could not find where the LOGging of software-center goes so I put in a
couple of print statements and found the following:
* On the first call of software-center after system boot I get an
"org.freedesktop.Geoclue.Error.notAvailable: Geoclue master client has no
usable Address providers". The script falls back to _get_region_dumb(), which
fails for lack of an underscore in the locale.
* On the second call, client.GetAddress() returns rather detailed location
information, of which the country code is used.
So, the first problem is, why does the Geoclue call fail on first try
and succeed on second.
The second problem is, what can my system use as a fallback, given there
is no country information in my locale. For this I need to know what the
country is used for.
Since nobody here seems to know the answer I dug through a bit of code
and found the following comment (in categories.py):
""" this build the dict used to substitute menu entries dynamically,
currently used for the CURRENT_REGION
The country code is put into a dictionary (_template_dict) under the key
CURRENT_REGION. It is then used to make substitutions in many strings
("Utility", "Accessibility", "Settings", etc), none of which, however,
seems at present to contain the CURRENT_REGION key.
I conclude that it is safe for me to use an empty country code as
fallback, by putting the following check into _get_region_dumb():
if not '_' in loc:
return res
I still suggest that this is a bug and should be fixed.
** Attachment added: "check for locale without underscore in region.py"
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1535620/+attachment/4580715/+files/patch_region.py
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1535620
Title:
software-center crashes on locale without underscore
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1535620/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs