Opened 10 years ago

Closed 8 years ago

#88 closed defect (fixed)

yum commands fail when running under LANG=ja_JP

Reported by: Alex Taylor Owned by:
Priority: Feedback Pending Milestone:
Component: rpm Version:
Severity: highest Keywords:
Cc:

Description

Running any yum command on a Japanese OS/2 system, or any language system when SET LANG=ja_JP has been set, results only in an error output similar to the following.

[E:\]yum list updates
Traceback (most recent call last):
  File "/@unixroot/usr/lib/python2.7/site.py", line 550, in <module>
    main()
  File "/@unixroot/usr/lib/python2.7/site.py", line 540, in main
    setencoding()
  File "/@unixroot/usr/lib/python2.7/site.py", line 494, in setencoding
    sys.setdefaultencoding(encoding) # Needs Python Unicode build !

Using yum 3.2.27-6 and python 2.7.6-10.

(IIRC, this seems to be a somewhat different error message than I got under the same circumstances with python 2.6.)

The workaround is to run SET LANG=en_US before running any yum command, but it's difficult for me to ask the user(s) I'm supporting to do that.

Change History (6)

comment:1 by Alex Taylor, 10 years ago

Correction: with Python 2.6, "SET LANG=en_US" was a sufficient workaround.

However, with Python 2.7, in addition to issuing "SET LANG=en_US", it was also necessary to "chcp 850". (Naturally this only works if 850 is one of the prepared codepages in CONFIG.SYS.)

I suspect this is a Python error rather than specifically a yum error.

comment:2 by Lewis Rosenthal, 8 years ago

Severity: highest

Related to #182.

comment:3 by Silvan Scherrer, 8 years ago

Priority: majorFeedback Pending

I wonder if this is still the case with the latest python. Alex could you please try?

comment:4 by Alex Taylor, 8 years ago

Looking good on preliminary tests!

Did the following:

  • add file /etc/rpm/platform with 'i686-OS/2-OS/2'
  • chcp 850, set lang=en_US
  • yum install netlabs-exp
  • yum update os2-base
  • yum update python

Closed OS/2 window, open new command prompt with default JP lang (ja_JP) and codepage (932).

Ran 'yum update yum'. Operation ran successfully with output in Japanese.

Ran yum update on several other packages. Same result.

This seems to be a success.

Last edited 8 years ago by Alex Taylor (previous) (diff)

comment:5 by Yuri Dario, 8 years ago

great!

Please close this ticket as soon as you think it is fixed.

comment:6 by Silvan Scherrer, 8 years ago

Resolution: fixed
Status: newclosed

no more feedback since 3 month, so I consider it done and working.

Note: See TracTickets for help on using tickets.