bodhi/tests
by Luke Macken
bodhi/tests/test_controllers.py | 44 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
New commits:
commit a8c3c0ef2a1e717f3bb6e73fec065f4e3d5eca8e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jul 31 16:02:15 2009 -0400
Add a test_updating_build_during_edit unit test
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index d65b8bf..8c56d48 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -4,6 +4,7 @@
import os
import turbogears
import cPickle as pickle
+from datetime import datetime
from turbogears import testutil, database, config
turbogears.update_config(configfile='bodhi.cfg', modulename='bodhi.config')
@@ -1189,3 +1190,46 @@ class TestControllers(testutil.DBTest):
assert 'kernel-2.6.29.1-111.fc7.x86_64' in json
assert 'TurboGears-1.0.2.2-2.fc7' in json
assert json['TurboGears-1.0.2.2-2.fc7']['notes'] == 'foobar'
+
+
+ def test_updating_build_during_edit(self):
+ session = login()
+ create_release()
+ params = {
+ 'builds' : 'TurboGears-2.6.23.1-21.fc7',
+ 'release' : 'Fedora 7',
+ 'type_' : 'bugfix',
+ 'bugs' : '',
+ 'notes' : 'foobar',
+ 'request' : None,
+ 'stable_karma' : 5,
+ 'unstable_karma' : -5
+ }
+ self.save_update(params, session)
+ update = PackageUpdate.byTitle(params['builds'])
+ update.status = 'testing'
+ update.date_pushed = datetime.now()
+ update.pushed = True
+
+ params = {
+ 'builds' : 'TurboGears-2.6.24-1.fc7',
+ 'edited' : 'TurboGears-2.6.23.1-21.fc7',
+ 'release' : 'Fedora 7',
+ 'type_' : 'security',
+ 'bugs' : '',
+ 'notes' : 'foobar',
+ 'stable_karma' : 1,
+ 'unstable_karma' : -1,
+ }
+ self.save_update(params, session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.status == 'pending'
+ assert update.request == 'testing'
+ assert update.title == 'TurboGears-2.6.24-1.fc7'
+ assert len(update.builds) == 1
+ assert update.builds[0].nvr == 'TurboGears-2.6.24-1.fc7'
+ try:
+ b = PackageBuild.byNvr('TurboGears-2.6.23.1-21.fc7')
+ assert False, "Old obsolete build still exists!!"
+ except SQLObjectNotFound:
+ pass
14 years, 9 months
bodhi/templates
by Luke Macken
bodhi/templates/master.kid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 75f7228e4141cef0c176ee049bbe1dc2065c6457
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jul 31 15:51:55 2009 -0400
Fix a typo in the master footer
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index eddbcab..c4fb84f 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -136,7 +136,7 @@ $(document).ready(function() {
<div id="fedora-footer">
Bodhi Version: ${version} -- Server: ${hostname}<br/>
Copyright © 2007-2008 Red Hat, Inc. and others. All Rights Reserved.<br/>
- Licensed under the GNU Public License v2 or later.</br />
+ Licensed under the GNU Public License v2 or later.<br />
The Fedora Project is maintained and driven by the community and sponsored by Red Hat.<br/>This is a community maintained site. Red Hat is not responsible for content.<br/>
[ <a href="http://fedoraproject.org/wiki/Legal">Legal</a>, <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a> ]
</div>
14 years, 9 months
bodhi/templates
by Luke Macken
bodhi/templates/master.kid | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 3337aa0ea6450dbd9b0236112b09fd69ce405656
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jul 31 11:26:46 2009 -0400
Mention the license in the footer (#514617)
diff --git a/bodhi/templates/master.kid b/bodhi/templates/master.kid
index db056db..eddbcab 100644
--- a/bodhi/templates/master.kid
+++ b/bodhi/templates/master.kid
@@ -136,6 +136,7 @@ $(document).ready(function() {
<div id="fedora-footer">
Bodhi Version: ${version} -- Server: ${hostname}<br/>
Copyright © 2007-2008 Red Hat, Inc. and others. All Rights Reserved.<br/>
+ Licensed under the GNU Public License v2 or later.</br />
The Fedora Project is maintained and driven by the community and sponsored by Red Hat.<br/>This is a community maintained site. Red Hat is not responsible for content.<br/>
[ <a href="http://fedoraproject.org/wiki/Legal">Legal</a>, <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a> ]
</div>
14 years, 9 months
2 commits - bodhi/release.py bodhi.spec
by Luke Macken
bodhi.spec | 5 ++++-
bodhi/release.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit d50e2747be9be7d08ad47e484e901c03361a5d3d
Merge: e1a32cb... 532d9c2...
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Jul 27 11:37:42 2009 -0400
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/bodhi
commit e1a32cb63d6b4bd992235879b9d9d4f37aa40945
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jul 10 12:11:44 2009 -0400
v0.6.2
diff --git a/bodhi.spec b/bodhi.spec
index 065ab02..12a5714 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -2,7 +2,7 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: bodhi
-Version: 0.6.1
+Version: 0.6.2
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -115,6 +115,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Fri Jul 10 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.2-1
+- 0.6.2
+
* Thu Jul 09 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.1-1
- 0.6.1
diff --git a/bodhi/release.py b/bodhi/release.py
index c5d9b68..5d5c887 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.6.1'
+VERSION = '0.6.2'
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'
14 years, 9 months
bodhi/mail.py
by Luke Macken
bodhi/mail.py | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 532d9c21e7ad2e1ed3f28c7bb5ccbae01574196f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Jul 22 15:23:04 2009 -0400
Remove a noisy debugging statement
diff --git a/bodhi/mail.py b/bodhi/mail.py
index f94fa90..6c11187 100644
--- a/bodhi/mail.py
+++ b/bodhi/mail.py
@@ -397,7 +397,6 @@ def get_template(update, use_template='fedora_errata_template'):
return templates
def send_mail(sender, to, subject, body):
- log.debug("send_mail(%s)" % locals())
from turbomail import MailNotEnabledException
message = turbomail.Message(sender, to, subject)
message.plain = body
14 years, 9 months
bodhi/jobs.py
by Luke Macken
bodhi/jobs.py | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 15c930d307c8f303fefcf6bb31741fbb41402231
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Jul 22 14:47:31 2009 -0400
Remove an unused line of code that I just randomly noticed
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index 6ee7adc..a726f18 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -91,7 +91,6 @@ def nagmail():
if get_age_in_days(date(update)) > 14:
if update.nagged:
if update.nagged.has_key(name) and update.nagged[name]:
- x = (datetime.utcnow() - update.nagged[name]).days
if (datetime.utcnow() - update.nagged[name]).days < 7:
continue # Only nag once a week at most
nagged = update.nagged
14 years, 9 months
bodhi/metadata.py
by Luke Macken
bodhi/metadata.py | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
New commits:
commit 09d2b0714277eeecb0655045ab8821ad25b4da92
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jul 10 12:10:00 2009 -0400
Fix a bug in our updateinfo generation with regard to updates with missing IDs
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index 6f87f2d..384eb29 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -45,6 +45,7 @@ class ExtendedMetadata:
self.koji = get_session()
self._create_document()
self._fetch_updates()
+ missing_ids = []
if cacheduinfo and exists(cacheduinfo):
log.debug("Loading cached updateinfo.xml.gz")
@@ -55,8 +56,11 @@ class ExtendedMetadata:
for update in self.updates:
for build in update.builds:
if not umd.get_notice(build.nvr):
- self.add_update(update)
- break
+ if update.updateid:
+ self.add_update(update)
+ break
+ else:
+ missing_ids.append(update.title)
# Add all relevant notices from the metadata to this document
ids = [update.updateid for update in self.updates if update.updateid]
@@ -71,7 +75,11 @@ class ExtendedMetadata:
if update.updateid:
self.add_update(update)
else:
- log.error("%s missing ID!" % update.title)
+ missing_ids.append(update.title)
+
+ if missing_ids:
+ log.error("%d updates with missing ID!" % len(missing_ids))
+ log.debug(missing_ids)
def _fetch_updates(self):
"""
@@ -90,8 +98,9 @@ class ExtendedMetadata:
self.updates.add(update)
except SQLObjectNotFound, e:
nonexistent.append(build['nvr'])
- log.warning("Couldn't find the following koji builds tagged as "
- "%s in bodhi: %s" % (self.tag, nonexistent))
+ if nonexistent:
+ log.warning("Couldn't find the following koji builds tagged as "
+ "%s in bodhi: %s" % (self.tag, nonexistent))
def _create_document(self):
log.debug("Creating new updateinfo Document for %s" % self.tag)
14 years, 9 months
bodhi.egg-info/PKG-INFO bodhi.spec
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.spec | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit c6d743e76541d7b42a4c0d6c0bc980f306a88182
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 11:49:19 2009 -0400
Sync up our specfile with rawhide
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index 54277a7..ba9389a 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.6.0
+Version: 0.6.1
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.spec b/bodhi.spec
index 9d38d0f..065ab02 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -57,6 +57,7 @@ Requires: python-turboflot
Requires: python-tgcaptcha
Requires: python-decorator
Requires: mod_wsgi
+Requires: httpd
%description server
@@ -178,9 +179,18 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
- 0.5.19
- Add a patch to get pagination working in TG 1.0.4.4
+* Sat Mar 14 2009 Luke Macken <lmacken(a)redhat.com> - 0.5.17-4
+- Require httpd
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 0.5.17-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
* Tue Feb 10 2009 Luke Macken <lmacken(a)redhat.com> - 0.5.18-1
- Bugfix release, and to stop using deprecated python-fedora APIs.
+* Mon Feb 2 2009 Toshio Kuratomi <toshio(a)fedoraproject.org> - 0.5.17-2
+- Own the %%{_sysconfdir}/bodhi directory.
+
* Thu Jan 22 2009 Luke Macken <lmacken(a)redhat.com> - 0.5.17-1
- Latest upstream bugfix release.
14 years, 9 months
8 commits - bodhi/controllers.py bodhi/release.py bodhi.spec bodhi/tools bodhi/util.py
by Luke Macken
bodhi.spec | 10 ++++++++--
bodhi/controllers.py | 8 ++++++--
bodhi/release.py | 2 +-
bodhi/tools/client.py | 14 ++++++++++----
bodhi/util.py | 2 +-
5 files changed, 26 insertions(+), 10 deletions(-)
New commits:
commit 01d2becf24bf58c33239e0e17fd37dc1f97e8174
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 11:36:59 2009 -0400
0.6.1
diff --git a/bodhi.spec b/bodhi.spec
index 79cb0f3..9d38d0f 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -2,7 +2,7 @@
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Name: bodhi
-Version: 0.6.0
+Version: 0.6.1
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -114,6 +114,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Thu Jul 09 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.1-1
+- 0.6.1
+
* Thu Jul 09 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.0-1
- 0.6.0 final
diff --git a/bodhi/release.py b/bodhi/release.py
index 1ef092c..c5d9b68 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.6.0'
+VERSION = '0.6.1'
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 bc546c23ce9e7fd5e3e8822dc17e3a281e7798e2
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 11:36:09 2009 -0400
Make our BODHI_URL configurable in the client.
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 064990b..9f9c0ca 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -15,6 +15,9 @@
# Copyright 2007 Red Hat, Inc
# Authors: Luke Macken <lmacken(a)redhat.com>
+__version__ = '0.6.0'
+__description__ = 'Command line tool for interacting with Bodhi'
+
import sys
import logging
import urllib2
@@ -26,13 +29,16 @@ from optparse import OptionParser
from fedora.client import AuthError, ServerError
from fedora.client.bodhi import BodhiClient
-__version__ = '0.5.1'
-__description__ = 'Command line tool for interacting with Bodhi'
+try:
+ from turbogears import config
+ from bodhi.util import load_config
+ load_config()
+ BODHI_URL = config.get('bodhi_url', 'https://admin.fedoraproject.org/updates/')
+except:
+ BODHI_URL = 'https://admin.fedoraproject.org/updates/'
-BODHI_URL = 'https://admin.fedoraproject.org/updates/'
log = logging.getLogger(__name__)
-
def get_parser():
usage = "usage: %prog [options] [build|package]"
parser = OptionParser(usage, description=__description__,
commit cb3b4be5dee64e9e2b644429ce5a4b604c4e49cf
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 11:22:32 2009 -0400
List comprehension > unnecessary lambdas
diff --git a/bodhi/util.py b/bodhi/util.py
index 41f8fee..a279146 100644
--- a/bodhi/util.py
+++ b/bodhi/util.py
@@ -189,7 +189,7 @@ def flash_log(msg):
def get_release_names():
from bodhi.tools.init import releases
- return map(lambda release: release['long_name'], releases)
+ return [release['long_name'] for release in releases]
def get_release_tuples():
from bodhi.tools.init import releases
commit 2fa4ea7711e1aabc4ec6cf7adfde48acca721ac7
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 10:51:06 2009 -0400
0.6.0
diff --git a/bodhi.spec b/bodhi.spec
index cd2e479..79cb0f3 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -3,7 +3,7 @@
Name: bodhi
Version: 0.6.0
-Release: 0.9.beta%{?dist}
+Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -114,6 +114,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Thu Jul 09 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.0-1
+- 0.6.0 final
+
* Mon Jul 06 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.0-0.7.beta
- beta7
commit eea3ee4617e7b2029d735ee90984296fba4a1643
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 10:48:54 2009 -0400
Fix a couple of pyflakes issues
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 3f79aba..dab5c90 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1049,10 +1049,10 @@ class Root(controllers.RootController):
def confirm_delete(self, nvr=None, ok=None, cancel=None):
update = PackageUpdate.byTitle(nvr)
if ok:
- flash(_(u"Delete completed"))
+ flash(u"Delete completed")
raise redirect('/delete/%s' % update.title)
if cancel:
- flash(_(u"Delete canceled" ))
+ flash(u"Delete canceled")
raise redirect(update.get_url())
return dict(form=self.ok_cancel_form, nvr=nvr)
commit ea039d607f9befda3b11fb5a6094e26bfa1c3357
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 10:47:29 2009 -0400
Revert "Disable bugzilla multicall by default, which should hopefully fix #254"
This reverts commit 88bb79f48463a82b48faf6442020ae855f1d4c62.
This change caused the following exception in production:
File "/usr/lib/python2.4/site-packages/bodhi/model.py", line 895, in fetch_details
if bug.product == 'Security Response':
File "/usr/lib/python2.4/site-packages/bugzilla/base.py", line 1104, in __getattr__
raise AttributeError, "field %s not in bugzilla.bugfields" % name
AttributeError: field product not in bugzilla.bugfields
diff --git a/bodhi/model.py b/bodhi/model.py
index abe04b1..8cb15b9 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -880,7 +880,6 @@ class Bugzilla(SQLObject):
password=password, cookiefile=cookie)
else:
bz = bugzilla.Bugzilla(url=config.get("bz_server"), cookiefile=cookie)
- bz.multicall = False
return bz
def fetch_details(self, bug=None):
commit e951675e8ce93a22c722a02c2b0adff3093ffca3
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 10:46:16 2009 -0400
Handle all exceptions from python-bugzilla
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index b69e185..3f79aba 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -771,6 +771,10 @@ class Root(controllers.RootController):
except xmlrpclib.Fault, f:
log.exception(f)
note.insert(0, "Unable to access one or more bugs")
+ except Exception, e:
+ log.error("Unknown exception thrown from python-bugzilla!")
+ note.insert(0, "Unable to access one or more bugs. Exception: %s" % e)
+
# If there are any security bugs, make sure this update is
# properly marked as a security update
commit 88bb79f48463a82b48faf6442020ae855f1d4c62
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 09:49:57 2009 -0400
Disable bugzilla multicall by default, which should hopefully fix #254
diff --git a/bodhi/model.py b/bodhi/model.py
index 8cb15b9..abe04b1 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -880,6 +880,7 @@ class Bugzilla(SQLObject):
password=password, cookiefile=cookie)
else:
bz = bugzilla.Bugzilla(url=config.get("bz_server"), cookiefile=cookie)
+ bz.multicall = False
return bz
def fetch_details(self, bug=None):
14 years, 9 months
bodhi/controllers.py bodhi.egg-info/SOURCES.txt
by Luke Macken
bodhi.egg-info/SOURCES.txt | 1 +
bodhi/controllers.py | 4 ++++
2 files changed, 5 insertions(+)
New commits:
commit c1963a3687a622238835ba2d977606a20350cdc1
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 9 08:12:00 2009 -0400
Add a new candidate_tags JSON method
diff --git a/bodhi.egg-info/SOURCES.txt b/bodhi.egg-info/SOURCES.txt
index 9cc9842..08e9f61 100644
--- a/bodhi.egg-info/SOURCES.txt
+++ b/bodhi.egg-info/SOURCES.txt
@@ -95,6 +95,7 @@ bodhi/static/images/karma1.png
bodhi/static/images/metrics-small.png
bodhi/static/images/metrics.png
bodhi/static/images/mugshot.png
+bodhi/static/images/newpackage.png
bodhi/static/images/null.png
bodhi/static/images/plus.png
bodhi/static/images/revoke.png
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 5d3dedc..b69e185 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1087,6 +1087,10 @@ class Root(controllers.RootController):
return dict(tags=[r.dist_tag for r in Release.select()])
@expose(allow_json=True)
+ def candidate_tags(self):
+ return dict(tags=[r.candidate_tag for r in Release.select()])
+
+ @expose(allow_json=True)
@identity.require(identity.in_group("security_respons"))
def approve(self, update):
""" Security response team approval for pending security updates """
14 years, 9 months