bodhi/controllers.py | 7 ++++---
bodhi/model.py | 17 ++++++++++++++---
2 files changed, 18 insertions(+), 6 deletions(-)
New commits:
commit 13f23d5e7a5ab8a430013922a5dcd96efa62d4fe
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:22:08 2010 +0000
Be a bit more verbose with regard to the requirements of the critpath
diff --git a/bodhi/model.py b/bodhi/model.py
index 6d0b539..9f26f67 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -349,6 +349,7 @@ class PackageUpdate(SQLObject):
@param pathcheck: Check for broken update paths for stable requests
"""
+ notes = []
if not authorized_user(self, identity):
raise InvalidRequest("Unauthorized to perform action on %s" %
self.title)
@@ -417,7 +418,15 @@ class PackageUpdate(SQLObject):
if not self.critpath_approved:
log.info("Critical path update not yet approved!")
action = 'testing'
- self.comment('Critical path update approved',
+ notes.append('This critical path update has not '
+ 'yet been approved. It must receive '
+ '%d positive karma from releng/qa, along '
+ 'with %d additional karma from the '
+ 'community.' % (
+ config.get('critpath.num_admin_approvals'),
+ config.get('critpath.min_karma') -
+ config.get('critpath.num_admin_approvals')))
+ self.comment('Critical path update approved by %s' % group,
author=identity.current.user_name)
mail.send_admin('critpath_approved', self)
break
@@ -428,7 +437,8 @@ class PackageUpdate(SQLObject):
self.request = action
self.pushed = False
#self.date_pushed = None
- flash_log("%s has been submitted for %s" % (self.title, action))
+ notes = notes and '. '.join(notes) or ''
+ flash_log("%s has been submitted for %s. %s"
%(self.title,action,notes))
self.comment('This update has been submitted for %s' % action,
author=identity.current.user_name)
mail.send_admin(action, self)
@@ -693,7 +703,8 @@ class PackageUpdate(SQLObject):
critpath_approved = self.critpath_approved
# Hack: Add admin groups to usernames (eg: "lmacken (releng)")
- admin_groups = config.get('admin_groups', 'releng qa
security_respons').split()
+ admin_groups = config.get('admin_groups',
+ 'releng qa security_respons').split()
for group in identity.current.groups:
if group in admin_groups:
commit 8764842eff0b887f871e4df3f83f0e35a312ae97
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:21:16 2010 +0000
Minor rewording
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 439e206..c6fbd95 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -893,8 +893,8 @@ class Root(controllers.RootController):
"consider pushing to testing first!")
# Discourage devs from pushing directly to stable for pending releases
elif update.request == 'stable' and update.release.locked:
- note.append("This update is bypassing updates-testing for a "
- "pending release, which is strongly discouraged. "
+ note.append("This update is bypassing testing for an "
+ "upcoming release, which is strongly discouraged.
"
"Please ensure that it is properly tested, or "
"consider pushing it to testing first.")
commit 315000368288c05ab81d7cdc14f760080b85331c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Feb 16 05:20:54 2010 +0000
Don't complain about pushing critpath to stable if it's already approved
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index e3156e7..439e206 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -886,7 +886,8 @@ class Root(controllers.RootController):
# Politely discourage devs from pushing critpath straight to stable
if (update.request == 'stable' and update.critpath and
'qa' not in identity.current.groups and
- 'releng' not in identity.current.groups):
+ 'releng' not in identity.current.groups and
+ not update.critpath_approved):
note.append("You're pushing a critical path package directly to
"
"stable, which is strongly discouraged. Please "
"consider pushing to testing first!")
Show replies by date