Bug 115420

Summary: Yum is not i18n-safe
Product: [Retired] Red Hat Raw Hide Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: yumAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: mitr
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-11 13:23:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to fix the above problem none

Description Nicolas Mailhot 2004-02-12 08:36:22 UTC
Yum is checking for system errors in english.
When the system returns localized errors, it fails.

[root@ulysse root]# yum check-update
Traceback (most recent call last):
  File "/usr/bin/yum", line 30, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum/yummain.py", line 169, in main
    lock('/var/run/yum.pid', mypid)
  File "/usr/share/yum/yummain.py", line 121, in lock
    while not yumlock.lock(lockfile, mypid, 0644):
  File "/usr/share/yum/yumlock.py", line 10, in lock
    if not msg.strerror == "File exists": raise msg
OSError: [Errno 17] Le fichier existe.: '/var/run/yum.pid'

[nim@ulysse nim]$ rpm -q yum
yum-2.0.4.20040103-1

Comment 1 Seth Vidal 2004-02-12 19:58:04 UTC
grumble.

I need to check against e.errno.

Thanks for pointing this out. I'll have a fix for it shortly.

Comment 2 Seth Vidal 2004-02-12 20:09:33 UTC
Created attachment 97625 [details]
patch to fix the above problem

give it a run - see if it resolves your problem. I'll look for others. If you
find anymore report them, Thanks.

Comment 3 Miloslav Trmac 2004-02-13 12:04:08 UTC
Wouldn't something like 

from errno import EEXIST
...
if not msg.errno == EEXIT 
...

be cleaner?

Comment 4 Seth Vidal 2004-02-13 13:52:13 UTC
I had already changed the patch to use errno instead.



Comment 5 Nicolas Mailhot 2004-02-13 17:31:03 UTC
Thanks.
If you still want me to test I'll try to do it during Sunday night or
next Monday

Comment 6 Seth Vidal 2004-02-13 17:48:39 UTC
please test it. I am fairly confident it will work but testing isn't bad.
thanks

Comment 7 Nicolas Mailhot 2004-02-19 18:28:47 UTC
The patch works.
Now it has only to find its way into a rawhide rpm;)

Comment 8 Nicolas Mailhot 2004-02-19 20:24:43 UTC
Sorry, shouldn't have closed this before it had hit an actual release

Comment 9 Nicolas Mailhot 2004-03-11 13:23:38 UTC
Seems fixed in RawHide now