start-bodhi
by Luke Macken
start-bodhi | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 3bd9d37c1014611676c05dcb2ea8529ff7f40317
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Nov 18 15:27:51 2010 -0500
Add __requires__='bodhi' to the start-bodhi script to get it working in F14
diff --git a/start-bodhi b/start-bodhi
index 1c51f71..5896d0f 100755
--- a/start-bodhi
+++ b/start-bodhi
@@ -1,5 +1,6 @@
#!/usr/bin/python -tt
""" Start script for bodhi """
+__requires__='bodhi'
from bodhi.commands import start, ConfigurationError
if __name__ == '__main__':
13 years, 5 months
bodhi/jobs.py
by Luke Macken
bodhi/jobs.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 846403075c612701de6283ee901d241798627b43
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Nov 16 16:56:40 2010 -0500
Stop spamming proventesters, as this information is now available in the
updates-testing digests.
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index b986aeb..c5c2a98 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -86,7 +86,7 @@ def nagmail():
]
oldname = None
mail_admin = False
- mail_proventesters = False
+ #mail_proventesters = False
for name, query, date in queries:
for update in query:
@@ -106,7 +106,7 @@ def nagmail():
oldname = name
name = 'old_testing_critpath'
mail_admin = True
- mail_proventesters = True
+ #mail_proventesters = True
log.info("[%s] Nagging %s about %s" % (name, update.submitter,
update.title))
@@ -114,9 +114,9 @@ def nagmail():
if mail_admin:
mail.send_admin(name, update)
mail_admin = False
- if mail_proventesters:
- mail.send(config.get('proventesters_email'), name, update)
- mail_proventesters = False
+ #if mail_proventesters:
+ # mail.send(config.get('proventesters_email'), name, update)
+ # mail_proventesters = False
nagged[name] = datetime.utcnow()
update.nagged = nagged
13 years, 5 months
bodhi/templates
by Luke Macken
bodhi/templates/search.kid | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 756b08d6903a3eebcb9a6b77317321711dcce7f5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Nov 16 16:24:50 2010 -0500
Add the update ID back to search results (#558)
diff --git a/bodhi/templates/search.kid b/bodhi/templates/search.kid
index 6939aa8..7cd8b54 100644
--- a/bodhi/templates/search.kid
+++ b/bodhi/templates/search.kid
@@ -20,6 +20,9 @@
<table class="list">
<tr class="list">
<th class="list">
+ <b>ID</b>
+ </th>
+ <th class="list">
<b>Update</b>
</th>
<th class="list">
@@ -46,6 +49,9 @@
</tr>
<?python row_color = "#FFFFFF" ?>
<tr class="list" bgcolor="${row_color}" py:for="update in updates">
+ <td class="list">
+ ${update.updateid}
+ </td>
<td class="list" width="35%">
<a class="list" href="${tg.url(update.get_url())}">${update.title.replace(',', ', ')}</a>
</td>
13 years, 5 months
bodhi/templates
by Luke Macken
bodhi/templates/show.kid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d533c19eb2f9556d30c8034c9e89342582a8074d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Nov 16 16:00:14 2010 -0500
Fix the testing status tooltips for EPEL (#486)
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 855bf77..b0e29a2 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -53,7 +53,7 @@ karma = "<img src=\"%s\" align=\"top\" /> <b>%d</b>" % (tg.url('/static/images/k
statusinfo = {
'pending': 'Pending - <b>This update has yet to be pushed to a repository. If it has a "testing" request, that means that it is in the queue to be pushed to the updates-testing repository. This process requires a release engineer to sign the packages and manually trigger the push, which usually occurs on a daily basis.</b>',
- 'testing': 'Testing - <b>This update is currently in the updates-testing repository. Once it meets the minimum karma or time-in-testing requirements, it can then be pushed to the stable updates repository. If wish to install this update and you do not have the updates-testing repo enabled, you can run `yum --enablerepo=updates-testing install package`.</b>',
+ 'testing': 'Testing - <b>This update is currently in the updates-testing repository. Once it meets the minimum karma or time-in-testing requirements, it can then be pushed to the stable updates repository. If wish to install this update and you do not have the updates-testing repo enabled, you can run `yum --enablerepo=%s install package`.</b>' % (update.release.collection_name == 'Fedora EPEL' and 'epel-testing' or 'updates-testing',),
'obsolete': 'Obsolete - <b>This update has been obsoleted by a newer update.</b>',
'stable': 'Stable - <b>This update has been released to the stable updates repository and is available for all users to install via the standard update mechanisms.</b>',
}
13 years, 5 months
bodhi/controllers.py bodhi/tests
by Luke Macken
bodhi/controllers.py | 18 ++++++++++++++++--
bodhi/tests/test_controllers.py | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 2 deletions(-)
New commits:
commit 025bce0cbdfec024ef96e2665d80d6ce74ef9be6
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Nov 16 15:18:40 2010 -0500
Support querying and commenting on updates by the update ID.
This is to help make it easy for AutoQA to integrate with Bodhi.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 88bde43..f323291 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -315,7 +315,14 @@ class Root(controllers.RootController):
# The package argument may be an update, build or package.
if package:
try:
- update = PackageUpdate.byTitle(package)
+ try:
+ update = PackageUpdate.byTitle(package)
+ except:
+ update = PackageUpdate.select(PackageUpdate.q.updateid==package)
+ if update.count():
+ update = update[0]
+ else:
+ raise SQLObjectNotFound
if not release and not status and not type_:
updates = [update]
else:
@@ -1239,7 +1246,14 @@ class Root(controllers.RootController):
flash_log("Karma must be one of (1, 0, -1), not %s" % repr(karma))
else:
try:
- update = PackageUpdate.byTitle(title)
+ try:
+ update = PackageUpdate.byTitle(title)
+ except SQLObjectNotFound:
+ update = PackageUpdate.select(PackageUpdate.q.updateid == title)
+ if update.count():
+ update = update[0]
+ else:
+ raise SQLObjectNotFound
if text == 'None':
text = None
else:
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index f4fbc43..9111c95 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -972,6 +972,15 @@ class TestControllers(testutil.DBTest):
}
self.save_update(params, session)
+ # Test querying by updateid
+ up = PackageUpdate.byTitle(params['builds'])
+ up.assign_id()
+ url = '/updates/list?' + urllib.urlencode({
+ 'package' : up.updateid
+ })
+ testutil.create_request(url, method='GET')
+ assert "1 update found" in cherrypy.response.body[0]
+
def test_default_request(self):
"""
Verify that updates are automatically submitted to testing, and that
@@ -2719,3 +2728,29 @@ class TestControllers(testutil.DBTest):
log = testutil.get_log()
update = PackageUpdate.byTitle(params['builds'])
assert update.request == 'stable', log
+
+ def test_comment_by_updateid(self):
+ """ Ensure we can comment on updates using the updateid """
+ session = login()
+ create_release()
+ params = {
+ 'builds' : 'TurboGears-1.0.8-1.fc7',
+ 'type_' : 'bugfix',
+ 'bugs' : '',
+ 'notes' : 'foobar',
+ 'request' : 'Stable',
+ 'suggest_reboot' : True,
+ 'autokarma' : True,
+ 'stable_karma' : 5,
+ 'unstable_karma' : -5
+ }
+ testutil.capture_log(['bodhi.controller', 'bodhi.util'])
+ self.save_update(params, session)
+ log = testutil.get_log()
+ up = PackageUpdate.byTitle(params['builds'])
+ up.assign_id()
+ assert up.updateid
+ testutil.create_request('/updates/comment/foobar/%s' % up.updateid,
+ method='POST', headers=session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.comments[-1].text == 'foobar', update.comments
13 years, 5 months
bodhi/metadata.py
by Luke Macken
bodhi/metadata.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 28d915a9db56c2b7fbfb5af09bbf23d500f71157
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Nov 16 14:36:07 2010 -0500
Ensure the updateinfo epoch is '0' as opposed to None.
https://fedorahosted.org/rel-eng/ticket/3971
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index 11dbda0..0996943 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -180,7 +180,7 @@ class ExtendedMetadata(object):
'release' : pkg['release'],
'arch' : pkg['arch'],
'src' : pkg['src'],
- 'epoch' : pkg.get('epoch', 0),
+ 'epoch' : pkg.get('epoch', 0) or '0',
})
self._insert(p, 'filename', text=pkg['filename'])
collection.appendChild(p)
13 years, 5 months