bodhi.egg-info/PKG-INFO | 2 +-
bodhi/tools/tagcheck.py | 35 +++++++++++++++++++++++++++++++----
2 files changed, 32 insertions(+), 5 deletions(-)
New commits:
commit b0df37067eeff884f837a21754595a90327c4af4
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Oct 6 20:15:38 2008 -0400
Update our tagcheck script to verify candidate and testing updates
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index 042be39..3614295 100644
--- a/bodhi.egg-info/PKG-INFO
+++ b/bodhi.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: bodhi
-Version: 0.5.3
+Version: 0.5.5
Summary: Bodhi is a modular web-system that facilitates the process of publishing updates
for a Fedora-based software distribution
Home-page:
https://fedorahosted.org/bodhi
Author: Luke Macken
diff --git a/bodhi/tools/tagcheck.py b/bodhi/tools/tagcheck.py
index 2fb14a8..625fe29 100755
--- a/bodhi/tools/tagcheck.py
+++ b/bodhi/tools/tagcheck.py
@@ -9,13 +9,38 @@ from sqlobject import SQLObjectNotFound
from turbogears.database import PackageHub
from bodhi.util import load_config
-from bodhi.model import PackageBuild
+from bodhi.model import PackageBuild, PackageUpdate
from bodhi.buildsys import get_session
def main():
load_config()
__connection__ = hub = PackageHub("bodhi")
koji = get_session()
+
+ # Check for testing updates that aren't tagged properly
+ for update in PackageUpdate.select(PackageUpdate.q.status=='testing'):
+ for build in update.builds:
+ tags = [tag['name'] for tag in koji.listTags(build=build.nvr)]
+ if '%s-updates-testing' % update.release.dist_tag not in tags:
+ print "%s marked as testing, but tagged with %s" % (build.nvr,
+ tags)
+
+ # Check all candidate updates to see if they are in a different bodhi state
+ for tag in ('dist-f9-updates-candidate',
'dist-f8-updates-candidate'):
+ tagged = [build['nvr'] for build in koji.listTagged(tag)]
+ for nvr in tagged:
+ try:
+ build = PackageBuild.byNvr(nvr)
+ for update in build.updates:
+ if update.status in ('testing', 'stable'):
+ print "%s %s but tagged as %s" % (nvr,
+ update.status,
+ tag)
+ except SQLObjectNotFound:
+ pass
+
+ # Make sure that all builds in koji tagged as an update exist
+ # in bodhi, and are in the expect state.
for tag in ('dist-f9-updates-testing', 'dist-f9-updates',
'dist-f8-updates-testing', 'dist-f8-updates'):
tagged = [build['nvr'] for build in koji.listTagged(tag)]
@@ -30,9 +55,11 @@ def main():
status = 'testing' in tag and 'testing' or 'stable'
for update in build.updates:
if update.status != status:
- print "%s is %s in bodhi but tagged as %s in koji" %
(update.title,
- update.status,
- tag)
+ print "%s is %s in bodhi but tagged as %s in koji" % (
+ update.title, update.status, tag)
+
if __name__ == '__main__':
main()
+
+# vim: ts=4 sw=4 expandtab