Bug 1541089 - mintlocale.py crashes due to unexpected output from localedef
Summary: mintlocale.py crashes due to unexpected output from localedef
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mintlocale
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: jcpunk
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-01 16:27 UTC by Bryan Wright
Modified: 2020-07-28 14:15 UTC (History)
2 users (show)

Fixed In Version: mintlocale-1.4.4-3.el7
Clone Of:
Environment:
Last Closed: 2020-07-28 14:15:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Bryan Wright 2018-02-01 16:27:43 UTC
Description of problem:

When running "/usr/bin/python2 /usr/lib/linuxmint/mintlocale/mintlocale.py" under CentOS 7 the script crashes when it encounters an unexpected character from the "localedef --list-archive" command.  The error message is:

Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintlocale/mintlocale.py", line 980, in <module>
    MintLocale(show_input_methods)
  File "/usr/lib/linuxmint/mintlocale/mintlocale.py", line 588, in __init__
    self.build_lang_list()
  File "/usr/lib/linuxmint/mintlocale/mintlocale.py", line 811, in build_lang_list
    locales = locales.decode('utf-8')
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 1071: invalid continuation byte

The character that triggers it is a 0xe5 in the name of the "bokmal" language (there are two versions of this line, one with the character and one without).


Version-Release number of selected component (if applicable):

mintlocale-1.4.4-1.el7.noarch
and localedef from glibc-common-2.17-196.el7_4.2.x86_64

How reproducible:


Steps to Reproduce:
1. Type "/usr/bin/python2 /usr/lib/linuxmint/mintlocale/mintlocale.py"


Actual results:
Command throws the error shown above.

Expected results:
Command should complete without error.

Additional info:

Comment 1 Fedora Admin user for bugzilla script actions 2020-06-12 02:50:17 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.

Comment 2 jcpunk 2020-07-13 15:19:08 UTC
I show the current version of glibc-common to be glibc-common-2.17-307.el7.1.x86_64.  Does the problem show up with this newer version?

Comment 3 Bryan Wright 2020-07-13 15:37:12 UTC
Same symptoms with glibc-common-2.17-307.el7.1.x86_64 under CentOS 7.

Comment 4 jcpunk 2020-07-13 16:12:48 UTC
I'm having a hard time finding the 'bokmal' language file you've referenced....  Where might it be located?  Which RPM provides it?

Comment 5 Bryan Wright 2020-07-13 17:19:17 UTC
As I recall (from 2.5 years ago!) mintlocale.py invokes "localedef --list-archive", which spits out a list that includes the following:

...
bo_CN.utf8
bo_IN
bo_IN.utf8
bokmal
bokm<E5>l
br_FR
br_FR.iso88591
br_FR.iso885915@euro
br_FR.utf8
...

Note the "bokmal" and "bokm<E5>l".  The "<E5>" seems to be what mintlocale.py chokes on.  The "localedef" command gets these from the file /usr/lib/locale/locale-archive, which is installed by the package glibc-common-2.17-307.el7.1.x86_64.  The problem seems to be that mintlocale.py chokes when it encounters an unexpected character.

Comment 6 jcpunk 2020-07-13 19:27:53 UTC
I seem unable to attach bugs to bodhi for the moment...

https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-1c5c5687c1

Tracks a package that should fix the issue.

Comment 7 Fedora Update System 2020-07-13 21:54:39 UTC
FEDORA-EPEL-2020-1c5c5687c1 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-1c5c5687c1

Comment 8 Fedora Update System 2020-07-14 01:18:54 UTC
FEDORA-EPEL-2020-1c5c5687c1 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-1c5c5687c1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2020-07-28 14:15:51 UTC
FEDORA-EPEL-2020-1c5c5687c1 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.