bodhi/controllers.py | 18 ++++++++++++++----
bodhi/masher.py | 7 ++++++-
bodhi/model.py | 2 ++
bodhi/tools/tagcheck.py | 41 ++++++++++++++++++++++++++++++++++++++++-
4 files changed, 62 insertions(+), 6 deletions(-)
New commits:
commit ecac38e1dcf7de6c06b0267d85ea003e9ae9bce1
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 28 18:21:30 2011 -0500
Update our bugzilla messages with proper build delimeters
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 2945448..b18fe17 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1004,7 +1004,8 @@ class Root(controllers.RootController):
"Please go to the following url:\n"
"%s\n"
"then log in and leave karma (feedback)." %
- (update.title, release.long_name, repo,
update.title,
+ (update.get_title(delim=', '),
+ release.long_name, repo, update.get_title(),
config.get('base_address') +
tg_url(update.get_url())))
except SQLObjectNotFound:
log.debug('Bug #%d not found in our database' % bug)
@@ -1038,7 +1039,8 @@ class Root(controllers.RootController):
"Please go to the following url:\n"
"%s\n"
"then log in and leave karma (feedback)." %
- (update.title, release.long_name, repo, update.title,
+ (update.get_title(delim=', '),
+ release.long_name, repo, update.get_title(),
config.get('base_address') +
tg_url(update.get_url())))
# If a request is specified, make it. By default we're submitting
commit 39ec4f6ef515cf8b1932f6ce15c72822fbd95189
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 28 18:18:15 2011 -0500
Mention the appropriate yum repo in our bugzilla messages
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 5b9c3c3..2945448 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -988,6 +988,10 @@ class Root(controllers.RootController):
bug = bugzilla.getbug(bug).bug_id
if bug not in original_bugs:
log.debug("Updating newly added bug: %s" % bug)
+ if update.release.collection_name == 'Fedora EPEL':
+ repo = 'epel-testing'
+ else:
+ repo = 'updates-testing'
try:
Bugzilla.byBz_id(bug).add_comment(update,
"Package %s:\n"
@@ -995,12 +999,12 @@ class Root(controllers.RootController):
"* was pushed to the %s updates-testing
repository,\n"
"* should be available at your local mirror within
two days.\n"
"Update it with:\n"
- "# su -c 'yum update
--enablerepo=updates-testing %s'\n"
+ "# su -c 'yum update --enablerepo=%s
%s'\n"
"as soon as you are able to, then reboot.\n"
"Please go to the following url:\n"
"%s\n"
"then log in and leave karma (feedback)." %
- (update.title, release.long_name, update.title,
+ (update.title, release.long_name, repo,
update.title,
config.get('base_address') +
tg_url(update.get_url())))
except SQLObjectNotFound:
log.debug('Bug #%d not found in our database' % bug)
@@ -1019,18 +1023,22 @@ class Root(controllers.RootController):
# Comment on all bugs
for bug in update.bugs:
+ if update.release.collection_name == 'Fedora EPEL':
+ repo = 'epel-testing'
+ else:
+ repo = 'updates-testing'
bug.add_comment(update,
"Package %s:\n"
"* should fix your issue,\n"
"* was pushed to the %s updates-testing repository,\n"
"* should be available at your local mirror within two
days.\n"
"Update it with:\n"
- "# su -c 'yum update --enablerepo=updates-testing
%s'\n"
+ "# su -c 'yum update --enablerepo=%s %s'\n"
"as soon as you are able to, then reboot.\n"
"Please go to the following url:\n"
"%s\n"
"then log in and leave karma (feedback)." %
- (update.title, release.long_name, update.title,
+ (update.title, release.long_name, repo, update.title,
config.get('base_address') +
tg_url(update.get_url())))
# If a request is specified, make it. By default we're submitting
commit 70551dafa29f01e4b7224d118a089bd62b6ea288
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 28 16:31:28 2011 -0500
Update our masher sanity checker to handle different arch variation.
For example, you can define "arches = 'ppc/ppc64'" which will make
sure either
ppc OR ppc64 exist in the mash. We need this for support both EL5 (ppc) and
EL6 (ppc64).
diff --git a/bodhi/masher.py b/bodhi/masher.py
index ee03f3d..4584319 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -528,7 +528,12 @@ class MashTask(Thread):
# make sure the new repository has our arches
for arch in config.get('arches').split():
- if arch not in arches and arch not in [arch.split('.')[0] for
arch in arches]:
+ if '/' in arch: # 'ppc/ppc64'
+ one, other = arch.split('/')
+ if one not in arches and other not in arches:
+ self.error_log("Cannot find arch %s OR %s in %s" %
(one, other, newrepo))
+ raise MashTaskException
+ elif arch not in arches:
self.error_log("Cannot find arch %s in %s" % (arch,
newrepo))
raise MashTaskException
commit c83f7230efe3511868e89166eb0b3a4bdaa7813e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Feb 28 16:19:57 2011 -0500
Make the Release.pending_stable_tag work for pending releases
diff --git a/bodhi/model.py b/bodhi/model.py
index 894f091..5f953e2 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -102,6 +102,8 @@ class Release(SQLObject):
@property
def pending_stable_tag(self):
+ if self.locked:
+ return '%s-updates-pending' % self.dist_tag
return self.stable_tag + '-pending'
@property
commit c1a42c7d3058bc2dc89a83fe2e7e467f1d189883
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Feb 26 00:49:15 2011 -0500
Update our tagcheck script to clean up any stray pending tags
diff --git a/bodhi/tools/tagcheck.py b/bodhi/tools/tagcheck.py
index c80603f..a1df758 100755
--- a/bodhi/tools/tagcheck.py
+++ b/bodhi/tools/tagcheck.py
@@ -21,6 +21,46 @@ def main():
tasks = []
broke = set()
+ # Clean up any stray pending tags
+ for release in Release.select():
+ print "Finding all pending-testing builds..."
+ if release.name.startswith('EL'):
+ continue
+
+ tag = release.pending_testing_tag
+ 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',
'obsolete'):
+ print "%s %s" % (nvr, update.status)
+ if '--fix' in sys.argv:
+ print "Untagging %s" % nvr
+ koji.untagBuild(tag, nvr, force=True)
+ except SQLObjectNotFound:
+ print "Can't find build for %s" % nvr
+ if '--fix' in sys.argv:
+ print "Untagging %s" % nvr
+ koji.untagBuild(tag, nvr, force=True)
+
+ tag = release.pending_stable_tag
+ 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 ('pending', 'obsolete'):
+ print "%s %s" % (nvr, update.status)
+ if '--fix' in sys.argv:
+ print "Untagging %s" % nvr
+ koji.untagBuild(tag, nvr, force=True)
+ except SQLObjectNotFound:
+ print "Can't find build for %s" % nvr
+ if '--fix' in sys.argv:
+ print "Untagging %s" % nvr
+ koji.untagBuild(tag, nvr, force=True)
+
# Check for testing updates that aren't tagged properly
for update in PackageUpdate.select(PackageUpdate.q.status=='testing'):
dest_tag = update.release.testing_tag
@@ -101,7 +141,6 @@ def main():
print "bad_tasks = %r" % bad_tasks
-
if __name__ == '__main__':
main()