On Fri, Jul 10, 2009 at 11:08:14AM +0200, josef reidinger wrote:
JiXXXX XXrain napsal(a):
def test_version package, version + old_lang = ENV['LANG'] + ENV['LANG'] = 'C' v = `rpm -q #{package}` + ENV['LANG'] = old_lang escape v, "install #{package} >= #{version}" if v =~ /is not installed/ nvr = v.split "-" rel = nvr.pop
Isn't easier just use v = `LANG=C rpm -q #{package}` instead of this patch? less code is better code :) JR
That's exactly what I suggested too, but it does not work, assuming LANG=C to be the command. Any other way, besides `sh -c "LANG=C foo"` ? The pickaxe book shows an example with "fork do... ENV[]=.." -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org