Opened 5 years ago

Closed 3 years ago

#88 closed defect (fixed)

yum commands fail when running under LANG=ja_JP

Reported by: ataylor 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 Changed 5 years ago by ataylor

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 Changed 3 years ago by lewisr

  • Severity set to highest

Related to #182.

comment:3 Changed 3 years ago by diver

  • Priority changed from major to Feedback Pending

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

comment:4 Changed 3 years ago by ataylor

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 3 years ago by ataylor (previous) (diff)

comment:5 Changed 3 years ago by ydario

great!

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

comment:6 Changed 3 years ago by diver

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.