Mailinglist Archive: yast-devel (152 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] <rest-service> master : made check for packages work in non-english locale
  • From: josef reidinger <jreidinger@xxxxxxx>
  • Date: Fri, 10 Jul 2009 11:08:14 +0200
  • Message-id: <4A5704FE.1060505@xxxxxxx>
JiXXXX XXrain napsal(a):
ref: refs/heads/master
commit 1666acacf0784ddec98cdb7fc0b35e9882ee5d33
Author: Ji�í Šrain <jsrain@xxxxxxx>
Date: Fri Jul 10 11:03:28 2009 +0200

made check for packages work in non-english locale
---
webservice/lib/tasks/checks.rake | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/webservice/lib/tasks/checks.rake
b/webservice/lib/tasks/checks.rake
index 6f3ac9d..06fb74c 100644
--- a/webservice/lib/tasks/checks.rake
+++ b/webservice/lib/tasks/checks.rake
@@ -24,7 +24,10 @@ def test_module name, package
end

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
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups