apache/bodhi.wsgi | 2 +-
bodhi.spec | 7 +++++--
bodhi/controllers.py | 2 +-
bodhi/model.py | 13 ++++++++++++-
bodhi/release.py | 2 +-
bodhi/templates/master.kid | 9 +++++----
bodhi/tests/test_controllers.py | 18 ++++++++++++++++++
bodhi/util.py | 4 ++--
8 files changed, 45 insertions(+), 12 deletions(-)
New commits:
commit 9d28335e1293d80d090a9a41f70eb71b7ff6d50e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 30 01:01:13 2008 -0400
For some reason, these characters cause Unicode errors in rawhide
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index 7587a99..db056db 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -113,8 +113,9 @@ $(document).ready(function() {
<!-- content BEGIN -->
<div id="fedora-middle-two">
- <div class="fedora-corner-tr"> </div>
- <div class="fedora-corner-tl"> </div>
+ <div class="fedora-corner-tr"></div>
+ <div class="fedora-corner-tl"></div>
+
<div id="fedora-content">
<div id="page-main">
@@ -126,8 +127,8 @@ $(document).ready(function() {
</div>
</div>
- <div class="fedora-corner-br"> </div>
- <div class="fedora-corner-bl"> </div>
+ <div class="fedora-corner-br"></div>
+ <div class="fedora-corner-bl"></div>
</div>
<!-- content END -->
commit bcc673fab69067e555654113d640f0152511f225
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 30 00:31:12 2008 -0400
Add a revoke action, and a unit test for it (myfedora#18)
diff --git a/bodhi/model.py b/bodhi/model.py
index 32bd047..293d097 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -286,7 +286,7 @@ class PackageUpdate(SQLObject):
if not authorized_user(self, identity):
raise InvalidRequest("Unauthorized to perform action on %s" %
self.title)
- if action not in ('testing', 'stable', 'obsolete',
'unpush'):
+ if action not in ('testing', 'stable', 'obsolete',
'unpush', 'revoke'):
raise InvalidRequest("Unknown request: %s" % action)
if action == self.status:
raise InvalidRequest("%s already %s" % (self.title, action))
@@ -331,6 +331,17 @@ class PackageUpdate(SQLObject):
"already released, and is newer "
"than %s" %
(oldBuild['nvr'],
mybuild['nvr']))
+ elif action == 'revoke':
+ if self.request:
+ flash_log('%s %s request revoked' % (self.title, self.request))
+ self.request = None
+ self.comment('%s request revoked' % action,
+ author=identity.current.user_name)
+ mail.send_admin('revoke', self)
+ else:
+ flash_log('%s does not have a request to revoke' % self.title)
+ return
+
self.request = action
self.pushed = False
self.date_pushed = None
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index ea03252..efec675 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -1123,3 +1123,21 @@ class TestControllers(testutil.DBTest):
assert PackageUpdate.select().count() == 1
assert PackageBuild.select().count() ==
len(params['builds'].split(','))
testutil.print_log()
+
+ def test_revoke_request(self):
+ session = login()
+ create_release(num='8', dist='dist-f')
+ params = {
+ 'builds' : u'TurboGears-1.0.7-1.fc8',
+ 'type_' : 'bugfix',
+ 'bugs' : '',
+ 'notes' : '',
+ }
+ testutil.capture_log(['bodhi.controllers', 'bodhi.util'])
+ self.save_update(params, session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request == 'testing'
+ testutil.create_request('/updates/request/revoke/%s' %
params['builds'],
+ headers=session, method='POST')
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request == None
commit c3979d71692d9186427fd21095aa3ade9207dfad
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Oct 30 00:30:39 2008 -0400
Setting the webpath to None was a bad idea...
diff --git a/apache/bodhi.wsgi b/apache/bodhi.wsgi
index 6d33f5c..0e11996 100644
--- a/apache/bodhi.wsgi
+++ b/apache/bodhi.wsgi
@@ -17,7 +17,7 @@ load_config()
turbogears.config.update({'global': {'server.environment':
'production'}})
turbogears.config.update({'global': {'autoreload.on': False}})
turbogears.config.update({'global': {'server.log_to_screen': False}})
-turbogears.config.update({'global': {'server.webpath': None}})
+#turbogears.config.update({'global': {'server.webpath': None}})
from bodhi import jobs
turbogears.startup.call_on_startup.append(jobs.schedule)
commit c531702de8c4ec3dcc4d2849d0aede46848f7304
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Oct 24 18:34:26 2008 -0400
0.5.10
diff --git a/bodhi.spec b/bodhi.spec
index d9b17aa..79469e2 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -2,8 +2,8 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print
sys.version[:3]")}
Name: bodhi
-Version: 0.5.9
-Release: 4%{?dist}
+Version: 0.5.10
+Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -113,6 +113,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Fri Oct 24 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.10-3
+- Latest upstream release
+
* Wed Oct 15 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.9-2
- Fix a trivial module import issue
diff --git a/bodhi/release.py b/bodhi/release.py
index d906c22..c2a3af8 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.5.9'
+VERSION = '0.5.10'
NAME = 'bodhi'
DESCRIPTION = 'Bodhi is a modular web-system that facilitates the process of
publishing updates for a Fedora-based software distribution'
AUTHOR = 'Luke Macken'
commit 85439d05bf717f7eab422e45424b9aefcf31bab5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Oct 24 18:09:15 2008 -0400
Return 403's from our login when necessary. (#466510)
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 4c4e196..7d6b24c 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -168,7 +168,7 @@ class Root(controllers.RootController):
forward_url= cherrypy.request.headers.get("Referer",
"/")
# This seems to be the cause of some bodhi-client errors
- # cherrypy.response.status=403
+ cherrypy.response.status=403
return dict(message=msg, previous_url=previous_url, logging_in=True,
original_parameters=cherrypy.request.params,
forward_url=forward_url)
commit a6d0da3f1ce84800f1a81995fba91ce7d7a387aa
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Oct 24 18:09:02 2008 -0400
Kill some whitespace
diff --git a/bodhi/util.py b/bodhi/util.py
index 08f4466..77b692a 100644
--- a/bodhi/util.py
+++ b/bodhi/util.py
@@ -387,7 +387,7 @@ def sanity_check_repodata(myurl):
myurl += 'repodata/'
else:
baseurl = baseurl.replace('repodata/', '/')
-
+
rf = myurl + 'repomd.xml'
try:
rm = urlgrabber.urlopen(rf)
@@ -414,7 +414,7 @@ def sanity_check_repodata(myurl):
except urlgrabber.grabber.URLGrabError, e:
errorstrings.append('Error accessing repository %s' % e)
-
+
if errorstrings:
raise RepodataException(','.join(errorstrings))