Greetings gang,
I discovered the following failure while examining cron output for in
production. I haven't dug into the issue at all yet, but it seems to be
caused by package NVR's that do not contain a %{dist} tag at the end.
In this particular case, the package was 'glibc' [1]. I suspect this is
not a systemmic problem, but perhaps a conditional check around the
get_distro() call? Perhaps something like the following ...
diff --git a/tests/initscripts/control.autoqa
b/tests/initscripts/control.autoqa
index c380c81..d088db1 100644
--- a/tests/initscripts/control.autoqa
+++ b/tests/initscripts/control.autoqa
@@ -9,8 +9,13 @@ labels = ['virt']
# must be present (like 'fc13'). If proper label is not found
the test will not execute
if autoqa_args.has_key('nvrs'):
from autoqa.util import get_distro
- distro = get_distro(autoqa_args['nvrs'][0])
- labels.append(distro)
+ try:
+ distro = get_distro(autoqa_args['nvrs'][0])
+ except IndexError:
+ # Optionally emit a warning that no %{dist} string was
found?
+ pass
+ else:
+ labels.append(distro)
# we want to run initscripts just for post-koji-build
if event in ['post-koji-build']:
Thanks,
James
[1]
http://koji.fedoraproject.org/koji/packageinfo?packageID=57
----- Forwarded message from Cron Daemon
<root(a)autoqa01.qa.fedoraproject.org> -----
Date: Tue, 9 Aug 2011 13:40:25 +0000 (UTC)
From: Cron Daemon <root(a)autoqa01.qa.fedoraproject.org>
To: autotest(a)autoqa01.qa.fedoraproject.org
Subject: Cron
<autotest@autoqa01> /usr/share/autoqa/watchers/koji-bodhi/watcher.py
Created job:
'post-koji-build:rpmguard.noarch (id 155001)'
Created job:
'post-koji-build:rpmlint.noarch (id 155002)'
Created job:
'post-koji-build:rpmguard.noarch (id 155003)'
Created job:
'post-koji-build:rpmlint.noarch (id 155004)'
File "/usr/bin/autoqa", line 185, in resolve_tests
test_vars[test] = eval_test_vars(test, default_test_vars)
File "/usr/bin/autoqa", line 147, in eval_test_vars
exec cfile in vars
File "/usr/share/autotest/client/site_tests/depcheck/control.autoqa",
line 12, in <module>
distro = get_distro(autoqa_args['nvrs'][0])
File "/usr/lib/python2.6/site-packages/autoqa/util.py", line 253, in
get_distro
raise ValueError('Distro name not found in %s' % rpmstr)
File "/usr/bin/autoqa", line 185, in resolve_tests
test_vars[test] = eval_test_vars(test, default_test_vars)
File "/usr/bin/autoqa", line 147, in eval_test_vars
exec cfile in vars
File "/usr/share/autotest/client/site_tests/initscripts/control.autoqa",
line 12, in <module>
distro = get_distro(autoqa_args['nvrs'][0])
File "/usr/lib/python2.6/site-packages/autoqa/util.py", line 253, in
get_distro
raise ValueError('Distro name not found in %s' % rpmstr)
Error: Can't evaluate test 'depcheck': Distro name not found in
glibc-2.14.90-4.1
Error: Can't evaluate test 'initscripts': Distro name not found
in glibc-2.14.90-4.1
----- End forwarded message -----