1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-26 04:02:11 +01:00

bugfix in build: in order to verify package signatures, run the external rpm

command with en_EN locale, because the output is being parsed
This commit is contained in:
Dr. Peter Poeml 2007-12-10 14:10:40 +00:00
parent 8138a32863
commit 7826163ca2

View File

@ -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():