From 7826163ca22d988f8b68b8999e8575ae55188417 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Mon, 10 Dec 2007 14:10:40 +0000 Subject: [PATCH] bugfix in build: in order to verify package signatures, run the external rpm command with en_EN locale, because the output is being parsed --- osc/fetch.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/osc/fetch.py b/osc/fetch.py index a48f7075..35a321a4 100644 --- a/osc/fetch.py +++ b/osc/fetch.py @@ -141,8 +141,17 @@ def verify_pacs(pac_list): # we can use os.popen4 because we don't care about the return value. # we check the output anyway, and rpm always writes to stdout. + + # save locale first (we rely on English rpm output here) + saved_LC_ALL = os.environ.get('LC_ALL') + os.environ['LC_ALL'] = 'en_EN' + (i, o) = os.popen4(['/bin/rpm', '-K'] + pac_list) + # restore locale + if saved_LC_ALL: os.environ['LC_ALL'] = saved_LC_ALL; + else: os.environ.pop('LC_ALL') + i.close() for line in o.readlines():