Mailinglist Archive: opensuse-buildservice (148 mails)

< Previous Next >
Re: [opensuse-buildservice] [PATCH] build: Fix signature verification
On 2.1.2011 22:59, Marcus Hüwe wrote:

On 2010-12-31 15:48:52 +0100, Michal Marek wrote:
There is no 'en_EN' locale, so osc build fails with

The following package could not be verified:
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_EN)

Firthermore, it is not a good idea to treat any warning message as
error, so do not fail of there is something different than the expected
rpm -K output.

Signed-off-by: Michal Marek <mmarek@xxxxxxx>
osc/ | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/osc/ b/osc/
index 2e39833..c565bfb 100644
--- a/osc/
+++ b/osc/
@@ -268,7 +268,7 @@ def verify_pacs_old(pac_list):

# save locale first (we rely on English rpm output here)
saved_LC_ALL = os.environ.get('LC_ALL')
- os.environ['LC_ALL'] = 'en_EN'
+ os.environ['LC_ALL'] = 'C'

Looks ok to me.

o = subprocess.Popen(['rpm', '-K'] + pac_list, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, close_fds=True).stdout
@@ -280,10 +280,7 @@ def verify_pacs_old(pac_list):
for line in o.readlines():

if not 'OK' in line:
- print
- print >>sys.stderr, 'The following package could not be
print >>sys.stderr, line
- sys.exit(1)

I don't agree with this change. IMHO the build should fail if
"rpm --checksig" fails (even if it's "just" a missing gpg key). If you
don't like this check you can easily disable it with
"osc build --no-verify...". Is there a specific warning which
shouldn't be treated as an error?

Agreed. Probably correct way would be to check if for each $package,
there is "$package:.... (?!NOT) OK ..." in the output and fail if some
packages were not reported, instead of looking for packages that rpm
complains about.

(Btw. is there a specific reason why you use this "old" verify

No, what's the new method?

Thanks for the review.
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
List Navigation