2007/12/10, Dr. Peter Poeml <poeml@suse.de>:
Hi,
thank you both for the report and the patch.
Additional comments below.
On Tue, Dec 04, 2007 at 05:06:19 +0100, Pavol Rusnak wrote:
Ladislav Michnovič wrote:
I have a little problem when using local build with osc. In file /usr/lib64/python2.5/site-packages/osc/fetch.py
Peter: Problem is in call on line 144 and in the checks after it on lines 150 and 156:
144: (i, o) = os.popen4(['/bin/rpm', '-K'] + pac_list) 150: if not 'OK' in line: 156: if 'NOT OK' in line:
English, German, French, Czech print "OK" or "NOT OK", but Slovak with "V PORIADKU" or "NIE JE V PORIADKU" (as these strings are marked for translation). Similar problem will arise with another languages that have these strings translated. I see 2 possible solutions:
1) check packages one at a time and look for return value from RPM (do not parse stdout)
That's what I wanted to avoid, because it would run 3 times slower. Hence the ugly output parsing.
2) set environment (LC_ALL) before rpm call
That should work, indeed.
But since the popen is acting on "foreign" input (after retrieving the buildinfo dependency list from the server), it might be harmful to run it through execution of a shell, and I'm a bit hesitant of applying your patch as is.
The only other way which cames to mind would be to save a possible LC_ALL environmental value, change it, and re-set it after running the external command.
This would work fine, so I'm happy. Thank you. Regards Ladislav.