3 commits - apache/bodhi.conf bodhi/controllers.py bodhi/tests Makefile
by Luke Macken
Makefile | 3 +
apache/bodhi.conf | 3 +
bodhi/controllers.py | 46 ++++++++++++-------------
bodhi/tests/test_controllers.py | 72 ++++++++++++++++++++--------------------
4 files changed, 63 insertions(+), 61 deletions(-)
New commits:
commit 90cce7dda27a268e5ed8334df1f5a5f18c806537
Author: Mathieu Bridon (bochecha) <bochecha(a)fedoraproject.org>
Date: Fri Aug 28 18:28:46 2009 +0200
Ticket #354: Bodhi doesn't honor the user's setting for building the RPM
Build the RPM in the user defined _topdir instead of hardcoding ~/rpmbuild.
diff --git a/Makefile b/Makefile
index ea3bcce..8a7aa9c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
# $Id: $
PKGNAME=bodhi
PKGRPMFLAGS=--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}/dist" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}" --define "_builddir ${PWD}"
+RPMTOPDIR=$(shell rpm --eval='%{_topdir}')
default: all
@@ -61,6 +62,6 @@ python-crypto python-imaging python-turboflot python-tgcaptcha python-nose.noarc
rpm: srpm
@rpm -i bodhi*src.rpm
- @rpmbuild -ba ~/rpmbuild/SPECS/bodhi.spec
+ @rpmbuild -ba ${RPMTOPDIR}/SPECS/${PKGNAME}.spec
.PHONY: docs test todo clean dist build install virt-install srpm pyflakes profile shell init run install-deps
commit b340375591c7d46e70292daa20e249ec2e83c4fd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 28 14:34:07 2009 -0400
Add some more mod_wsgi options
diff --git a/apache/bodhi.conf b/apache/bodhi.conf
index a0be3b4..aec4442 100644
--- a/apache/bodhi.conf
+++ b/apache/bodhi.conf
@@ -1,6 +1,7 @@
Alias /updates/static /usr/share/bodhi/static
-WSGIDaemonProcess bodhi user=apache maximum-requests=1000 display-name=bodhi
+WSGIDaemonProcess bodhi user=apache group=apache display-name=bodhi maximum-requests=1000 processes=2 threads=1
+
WSGISocketPrefix run/wsgi
WSGIRestrictStdout On
WSGIRestrictSignal Off
commit c4b6ee6c9c64280fbcec0d1c229d836ac7ec85db
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 28 14:33:07 2009 -0400
Disable the auto-obsoleting feature, which tends to cause more problems than it is worth
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index eb3698c..a925217 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -710,29 +710,29 @@ class Root(controllers.RootController):
# Obsolete any older pending/testing updates.
# If a build is associated with multiple updates, make sure that
# all updates are safe to obsolete, or else just skip it.
- for oldBuild in package.builds:
- obsoletable = False
- for update in oldBuild.updates:
- if update.status not in ('pending', 'testing') or \
- update.request or \
- update.release not in buildinfo[build]['releases'] or \
- update in pkgBuild.updates or \
- (edited and oldBuild in edited.builds):
- obsoletable = False
- break
- if rpm.labelCompare(util.get_nvr(oldBuild.nvr), nvr) < 0:
- log.debug("%s is obsoletable" % oldBuild.nvr)
- obsoletable = True
- if obsoletable:
- for update in oldBuild.updates:
- # Have the newer update inherit the older updates bugs
- for bug in update.bugs:
- bugs.append(unicode(bug.bz_id))
- # Also inherit the older updates notes as well
- notes += '\n' + update.notes
- update.obsolete(newer=build)
- note.append('This update has obsoleted %s, and has '
- 'inherited its bugs and notes.' % oldBuild.nvr)
+ #for oldBuild in package.builds:
+ # obsoletable = False
+ # for update in oldBuild.updates:
+ # if update.status not in ('pending', 'testing') or \
+ # update.request or \
+ # update.release not in buildinfo[build]['releases'] or \
+ # update in pkgBuild.updates or \
+ # (edited and oldBuild in edited.builds):
+ # obsoletable = False
+ # break
+ # if rpm.labelCompare(util.get_nvr(oldBuild.nvr), nvr) < 0:
+ # log.debug("%s is obsoletable" % oldBuild.nvr)
+ # obsoletable = True
+ # if obsoletable:
+ # for update in oldBuild.updates:
+ # # Have the newer update inherit the older updates bugs
+ # for bug in update.bugs:
+ # bugs.append(unicode(bug.bz_id))
+ # # Also inherit the older updates notes as well
+ # notes += '\n' + update.notes
+ # update.obsolete(newer=build)
+ # note.append('This update has obsoleted %s, and has '
+ # 'inherited its bugs and notes.' % oldBuild.nvr)
# Create or modify the necessary PackageUpdate objects
for release, builds in releases.items():
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index cbc8576..8dc9b2f 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -671,45 +671,45 @@ class TestControllers(testutil.DBTest):
self.save_update(params, session)
assert "This resource resides temporarily" in cherrypy.response.body[0], cherrypy.response.body[0]
- def test_obsoleting(self):
- session = login()
- create_release()
- params = {
- 'builds' : 'TurboGears-1.0.2.2-2.fc7',
- 'release' : 'Fedora 7',
- 'type_' : 'enhancement',
- 'bugs' : '1234',
- 'cves' : 'CVE-2020-0001',
- 'notes' : 'foobar',
- 'request' : None
- }
- self.save_update(params, session)
- print cherrypy.response.body[0]
- assert "This resource resides temporarily at <a href='http://localhost/updates/TurboGears-1.0.2.2-2.fc7'>http://localhost/updates/TurboGears-1.0.2.2-2.fc7</a>" in cherrypy.response.body[0]
- update = PackageUpdate.byTitle(params['builds'])
- assert update.status == 'pending'
+ #def test_obsoleting(self):
+ # session = login()
+ # create_release()
+ # params = {
+ # 'builds' : 'TurboGears-1.0.2.2-2.fc7',
+ # 'release' : 'Fedora 7',
+ # 'type_' : 'enhancement',
+ # 'bugs' : '1234',
+ # 'cves' : 'CVE-2020-0001',
+ # 'notes' : 'foobar',
+ # 'request' : None
+ # }
+ # self.save_update(params, session)
+ # print cherrypy.response.body[0]
+ # assert "This resource resides temporarily at <a href='http://localhost/updates/TurboGears-1.0.2.2-2.fc7'>http://localhost/updates/TurboGears-1.0.2.2-2.fc7</a>" in cherrypy.response.body[0]
+ # update = PackageUpdate.byTitle(params['builds'])
+ # assert update.status == 'pending'
- # Throw a newer build in, which should obsolete the previous
- newparams = {
- 'builds' : 'TurboGears-1.0.2.2-3.fc7',
- 'release' : 'Fedora 7',
- 'type_' : 'enhancement',
- 'bugs' : '4321',
- 'cves' : 'CVE-2020-0001',
- 'notes' : 'bizbaz'
- }
- self.save_update(newparams, session)
- newupdate = PackageUpdate.byTitle(newparams['builds'])
- assert newupdate.status == 'pending'
- update = PackageUpdate.byTitle(params['builds'])
- assert update.status == 'obsolete'
+ # # Throw a newer build in, which should obsolete the previous
+ # newparams = {
+ # 'builds' : 'TurboGears-1.0.2.2-3.fc7',
+ # 'release' : 'Fedora 7',
+ # 'type_' : 'enhancement',
+ # 'bugs' : '4321',
+ # 'cves' : 'CVE-2020-0001',
+ # 'notes' : 'bizbaz'
+ # }
+ # self.save_update(newparams, session)
+ # newupdate = PackageUpdate.byTitle(newparams['builds'])
+ # assert newupdate.status == 'pending'
+ # update = PackageUpdate.byTitle(params['builds'])
+ # assert update.status == 'obsolete'
- # The newer build should also inherit the obsolete updates bugs
- bugz = [bug.bz_id for bug in newupdate.bugs]
- assert 1234 in bugz and 4321 in bugz
+ # # The newer build should also inherit the obsolete updates bugs
+ # bugz = [bug.bz_id for bug in newupdate.bugs]
+ # assert 1234 in bugz and 4321 in bugz
- # The newer update should also inherit the obsolete updates notes
- assert newupdate.notes == "%s\n%s" % (newparams['notes'], params['notes'])
+ # # The newer update should also inherit the obsolete updates notes
+ # assert newupdate.notes == "%s\n%s" % (newparams['notes'], params['notes'])
def test_obsoleting_request(self):
session = login()
14 years, 7 months
3 commits - bodhi/controllers.py bodhi/metadata.py bodhi/tests bodhi/tools
by Luke Macken
bodhi/controllers.py | 7 +++++--
bodhi/metadata.py | 1 +
bodhi/tests/test_metadata.py | 1 +
bodhi/tools/0day.py | 34 ++++++++++++++++++++++++++++++++++
4 files changed, 41 insertions(+), 2 deletions(-)
New commits:
commit 85ed47759f4cbc8cd1a770198e24ef584d43d3ce
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 27 18:58:29 2009 -0400
Add the RPM Epoch to our updateinfo.xml (#519405)
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index 384eb29..8ce565e 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -245,6 +245,7 @@ class ExtendedMetadata:
'name' : rpm['name'],
'version' : rpm['version'],
'release' : rpm['release'],
+ 'epoch' : rpm['epoch'],
'arch' : rpm['arch'],
'src' : urlpath
})
diff --git a/bodhi/tests/test_metadata.py b/bodhi/tests/test_metadata.py
index 5424500..ca7905d 100644
--- a/bodhi/tests/test_metadata.py
+++ b/bodhi/tests/test_metadata.py
@@ -72,6 +72,7 @@ class TestExtendedMetadata(testutil.DBTest):
assert notice['description'] == update.notes
assert notice['issued'] != None
assert notice['update_id'] == update.updateid
+ assert notice['epoch'] == None
cve = notice['references'][0]
assert cve['type'] == 'cve'
assert cve['href'] == update.cves[0].get_url()
commit 3fb1e69619dc9a1ddf35039bc535a176dda682f0
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 27 18:57:55 2009 -0400
Get our test_delete unit test working again.
This ensures that all deleted updates get untagged, and that we
do not delete any builds that are in more than one update.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 03c5bbd..eb3698c 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -408,12 +408,15 @@ class Root(controllers.RootController):
if request_format() == 'json': return dict()
raise redirect(update.get_url())
if not update.pushed:
- mail.send_admin('deleted', update)
msg = "Deleted %s" % update.title
map(lambda x: x.destroySelf(), update.comments)
- map(lambda x: x.destroySelf(), update.builds)
+ for build in update.builds:
+ if len(build.updates) == 1:
+ build.destroySelf()
+ update.untag()
update.destroySelf()
flash_log(msg)
+ mail.send_admin('deleted', update)
else:
flash_log("Cannot delete a pushed update")
except SQLObjectNotFound:
commit a07a48db9018e44cdd219099bdf562796be26f5c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 20 21:39:00 2009 -0400
Add a script to calculate some F11 0day update metrics
diff --git a/bodhi/tools/0day.py b/bodhi/tools/0day.py
new file mode 100644
index 0000000..98eccf7
--- /dev/null
+++ b/bodhi/tools/0day.py
@@ -0,0 +1,34 @@
+#!/usr/bin/python -tt
+# A script to calculate F11 0day update metrics
+
+import time
+from datetime import datetime
+from pprint import pprint
+from turbogears.database import PackageHub
+from bodhi.util import load_config
+from bodhi.model import PackageUpdate, Release
+
+def main():
+ load_config()
+ print "Calculating F11 0day update metrics..."
+ updates = {'bugfix': [], 'security': [], 'enhancement': [], 'newpackage': []}
+ date = datetime(*time.strptime('06-09-2009', '%m-%d-%Y')[:-2])
+ f11 = Release.byName('F11')
+ for update in PackageUpdate.select(PackageUpdate.q.releaseID==f11.id):
+ for comment in update.comments:
+ if comment.author == 'bodhi' and comment.timestamp < date and \
+ comment.text.startswith('This update has been pushed to stable'):
+ updates[update.type].append(update.title)
+ break
+
+ pprint(updates)
+ print '=' * 80
+ print 'F11 0day stats'
+ print ' * %d security' % len(updates['security'])
+ print ' * %d bugfixes' % len(updates['bugfix'])
+ print ' * %d enhancements' % len(updates['enhancement'])
+ print ' * %d newpackage' % len(updates['newpackage'])
+
+if __name__ == '__main__':
+ main()
+
14 years, 7 months
bodhi/masher.py
by Luke Macken
bodhi/masher.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 2cf099440dfd7d989c2c613f3450e50ad2da6355
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Aug 19 21:55:01 2009 -0400
Prevent the resuming of a push without a masher state lock file
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 9c7df3c..bb67e51 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -239,6 +239,11 @@ class MashTask(Thread):
"push, or remove %s" % mash_lock)
raise MashTaskException
else:
+ if self.resume:
+ msg = "Trying to resume a push, yet %s doesn't exist!" % mash_lock
+ log.error(msg)
+ raise MashTaskException(msg)
+
log.debug("Creating lock for updates push: %s" % mash_lock)
lock = file(mash_lock, 'w')
pickle.dump({
14 years, 7 months
2 commits - bodhi/buildsys.py bodhi.egg-info/PKG-INFO bodhi.egg-info/SOURCES.txt bodhi/release.py bodhi.spec
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.egg-info/SOURCES.txt | 2 +-
bodhi.spec | 5 ++++-
bodhi/buildsys.py | 1 +
bodhi/release.py | 2 +-
5 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit f625f26785aceb91e14e51081b52cbaf8a170423
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 14 17:38:26 2009 -0400
0.6.4
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index 55e00f9..dc1eefe 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.2
+Version: 0.6.3
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.egg-info/SOURCES.txt b/bodhi.egg-info/SOURCES.txt
index f956a4c..690e787 100644
--- a/bodhi.egg-info/SOURCES.txt
+++ b/bodhi.egg-info/SOURCES.txt
@@ -35,6 +35,7 @@ bodhi.egg-info/dependency_links.txt
bodhi.egg-info/entry_points.txt
bodhi.egg-info/not-zip-safe
bodhi.egg-info/requires.txt
+bodhi.egg-info/sqlobject.txt
bodhi.egg-info/top_level.txt
bodhi/config/__init__.py
bodhi/config/app.cfg
@@ -93,7 +94,6 @@ bodhi/static/images/karma0.png
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
diff --git a/bodhi.spec b/bodhi.spec
index a3fe461..fb12033 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.3
+Version: 0.6.4
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 Aug 14 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.4-1
+- 0.6.4
+
* Thu Aug 13 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.3-1
- 0.6.3
diff --git a/bodhi/release.py b/bodhi/release.py
index d9e2bf2..a8d8779 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.6.3'
+VERSION = '0.6.4'
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 f5c217cb6a6da8095f45175753b816fa1d25b5f0
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 14 17:37:59 2009 -0400
Fix a session bug in the bodhi.buildsys module
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py
index 487af39..4ebafb4 100644
--- a/bodhi/buildsys.py
+++ b/bodhi/buildsys.py
@@ -210,6 +210,7 @@ def wait_for_tasks(tasks, sleep=300):
"""
log.debug("Waiting for %d tasks to complete: %s" % (len(tasks), tasks))
failed_tasks = []
+ session = get_session()
for task in tasks:
if not task:
log.debug("Skipping task: %s" % task)
14 years, 7 months
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 4f1de8a641f3872b698e776dd316fb3ae0ee2580
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Aug 13 12:48:26 2009 -0400
0.6.3
diff --git a/bodhi.spec b/bodhi.spec
index 12a5714..a3fe461 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.2
+Version: 0.6.3
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
+* Thu Aug 13 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.3-1
+- 0.6.3
+
* Fri Jul 10 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.2-1
- 0.6.2
diff --git a/bodhi/release.py b/bodhi/release.py
index 5d5c887..d9e2bf2 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.6.2'
+VERSION = '0.6.3'
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, 7 months
bodhi.egg-info/PKG-INFO bodhi.egg-info/SOURCES.txt bodhi/tests
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.egg-info/SOURCES.txt | 1 -
bodhi/tests/test_controllers.py | 29 ++++++++++++++++-------------
3 files changed, 17 insertions(+), 15 deletions(-)
New commits:
commit f74aec1cbca2206c6b7991402961ef433626d284
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 11 20:51:26 2009 -0400
Fix the latest broken unit test :)
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index ba9389a..55e00f9 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.1
+Version: 0.6.2
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.egg-info/SOURCES.txt b/bodhi.egg-info/SOURCES.txt
index 08e9f61..f956a4c 100644
--- a/bodhi.egg-info/SOURCES.txt
+++ b/bodhi.egg-info/SOURCES.txt
@@ -35,7 +35,6 @@ bodhi.egg-info/dependency_links.txt
bodhi.egg-info/entry_points.txt
bodhi.egg-info/not-zip-safe
bodhi.egg-info/requires.txt
-bodhi.egg-info/sqlobject.txt
bodhi.egg-info/top_level.txt
bodhi/config/__init__.py
bodhi/config/app.cfg
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 9ff1322..cbc8576 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -86,7 +86,7 @@ class TestControllers(testutil.DBTest):
'notes' : 'foobar'
}
self.save_update(params)
- assert "You must provide your credentials before accessing this resource." in cherrypy.response.body[0]
+ assert "You must provide your credentials before accessing this resource." in cherrypy.response.body[0], cherrypy.response.body
def test_new_update(self):
session = login()
@@ -568,16 +568,19 @@ class TestControllers(testutil.DBTest):
}
# Monkey-patch our DevBuildsys
- oldGetBuild = koji.getBuild
- koji.getBuild = lambda x: {'epoch': None, 'name': 'TurboGears',
- 'nvr': 'TurboGears-1.0.2.2-2.fc7',
- 'release': '2.fc7',
- 'tag_name': 'dist-fc7-updates-testing',
- 'version': '1.0.2.2'}
+ from bodhi.buildsys import DevBuildsys
+ oldGetBuild = DevBuildsys.getBuild
+ DevBuildsys.getBuild = lambda *x, **y: {
+ 'epoch': None, 'name': 'TurboGears',
+ 'nvr': 'TurboGears-1.0.2.2-2.fc7',
+ 'release': '2.fc7',
+ 'tag_name': 'dist-fc7-updates-testing',
+ 'version': '1.0.2.2'
+ }
# Make a newer build already exist
- oldListTagged = koji.listTagged
- koji.listTagged = lambda *x, **y: [
+ oldListTagged = DevBuildsys.listTagged
+ DevBuildsys.listTagged = lambda *x, **y: [
{'epoch': None, 'name': 'TurboGears',
'nvr': 'TurboGears-1.0.2.3-2.fc7', 'release': '2.fc7',
'tag_name': 'dist-fc7-updates-testing', 'version': '1.0.2.3'},
@@ -585,8 +588,8 @@ class TestControllers(testutil.DBTest):
testutil.capture_log(['bodhi.controllers', 'bodhi.util', 'bodhi.model'])
self.save_update(params, session)
- koji.getBuild = oldGetBuild
- koji.listTagged = oldListTagged
+ DevBuildsys.getBuild = oldGetBuild
+ DevBuildsys.listTagged = oldListTagged
assert 'Broken update path: TurboGears-1.0.2.2-2.fc7 is older than TurboGears-1.0.2.3-2.fc7 in dist-rawhide' in testutil.get_log()
def test_broken_update_path_on_request(self):
@@ -1122,13 +1125,13 @@ class TestControllers(testutil.DBTest):
'notes' : '',
'edited' : u'kdelibs-4.1.0-5.fc9,kdegames-4.1.0-2.fc9,konq-plugins-4.1.0-2.fc9,qt-4.4.1-2.fc9,quarticurve-kwin-theme-0.0-0.5.beta4.fc9,kdepimlibs-4.1.0-2.fc9,kdebase-workspace-4.1.0-8.fc9,akonadi-1.0.0-2.fc9,kde-l10n-4.1.0-2.fc9,kdegraphics-4.1.0-3.fc9,kdeutils-4.1.0-1.fc9.1,kdebindings-4.1.0-5.fc9,kde-i18n-3.5.9-8.fc9,kdeartwork-4.1.0-1.fc9,kdemultimedia-4.1.0-1.fc9,kdetoys-4.1.0-1.fc9,kdebase-runtime-4.1.0-1.fc9,kdeadmin-4.1.0-2.fc9,kdenetwork-4.1.0-2.fc9,kdeaccessibility-4.1.0-1.fc9,kdeplasma-addons-4.1.0-1.fc9,kdeedu-4.1.0-1.fc9,kdebase-4.1.0-1.fc9.1,kdesdk-4.1.0-1.fc9,kde-filesystem-4-17.fc9,qscintilla-2.2-3.fc9,qgtkstyle-0.0-0.2.20080719svn693.fc9,compiz-0.7.6-3.fc9.1,soprano-2.1-1.fc9,PyQt4-4.4.2-2.fc9,sip-4.7.6-1.fc9,automoc-1.0-0.8.rc1.fc9,phonon-4.2.0-2.fc9',
}
- #testutil.capture_log(['bodhi.controllers', 'bodhi.util', 'bodhi.model'])
+ testutil.capture_log(['bodhi.controllers', 'bodhi.util', 'bodhi.model'])
self.save_update(params, session)
+ testutil.print_log()
update = PackageUpdate.byTitle(params['builds'])
assert update.status == 'pending'
assert PackageUpdate.select().count() == 1
assert PackageBuild.select().count() == len(params['builds'].split(','))
- #testutil.print_log()
def test_revoke_request(self):
session = login()
14 years, 7 months
3 commits - bodhi/buildsys.py bodhi/tests
by Luke Macken
bodhi/buildsys.py | 3 +++
bodhi/tests/test_controllers.py | 26 +++++++++++++++-----------
bodhi/tests/test_model.py | 2 +-
3 files changed, 19 insertions(+), 12 deletions(-)
New commits:
commit bee8fbecfe47a0a92eefbb8e4efd16e901de2878
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 11 20:45:58 2009 -0400
Fix the TestControllers.test_broken_update_path_on_request unit test.
This broke when we recently stopped using a global singleton koji
session, which would timeout in production. This change now
monkeypatches the DevBuildsys class itself, instead of the instance
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 8c56d48..9ff1322 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -608,27 +608,31 @@ class TestControllers(testutil.DBTest):
self.save_update(params, session)
# Monkey-patch our DevBuildsys
- oldGetBuild = koji.getBuild
- koji.getBuild = lambda x: {'epoch': None, 'name': 'TurboGears',
- 'nvr': 'TurboGears-1.0.2.2-2.fc7',
- 'release': '2.fc7',
- 'tag_name': 'dist-fc7-updates-testing',
- 'version': '1.0.2.2'}
+ from bodhi.buildsys import DevBuildsys
+ oldGetBuild = DevBuildsys.getBuild
+ DevBuildsys.getBuild = lambda *x, **y: {
+ 'epoch': None, 'name': 'TurboGears',
+ 'nvr': 'TurboGears-1.0.2.2-2.fc7',
+ 'release': '2.fc7',
+ 'tag_name': 'dist-fc7-updates-testing',
+ 'version': '1.0.2.2'
+ }
# Make a newer build already exist
oldListTagged = koji.listTagged
- koji.listTagged = lambda *x, **y: [
+ DevBuildsys.listTagged = lambda *x, **y: [
{'epoch': None, 'name': 'TurboGears',
'nvr': 'TurboGears-1.0.2.3-2.fc7', 'release': '2.fc7',
'tag_name': 'dist-fc7-updates-testing', 'version': '1.0.2.3'},
]
- testutil.capture_log('bodhi.util')
+ testutil.capture_log(['bodhi.util', 'bodhi.controllers', 'bodhi.model'])
testutil.create_request('/updates/request/stable/%s' % params['builds'],
method='POST', headers=session)
- koji.getBuild = oldGetBuild
- koji.listTagged = oldListTagged
- assert 'Broken update path: TurboGears-1.0.2.3-2.fc7 is already released, and is newer than TurboGears-1.0.2.2-2.fc7' in testutil.get_log()
+ DevBuildsys.getBuild = oldGetBuild
+ DevBuildsys.listTagged = oldListTagged
+ output = testutil.get_log()
+ assert 'Broken update path: TurboGears-1.0.2.3-2.fc7 is already released, and is newer than TurboGears-1.0.2.2-2.fc7' in output, output
# Disabled for now, since we want to try and avoid as much bugzilla
# contact during our test cases as possible :)
commit 0d756996111a0752d573bbbaf98793f71644d4de
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 11 20:16:46 2009 -0400
Skip empty tasks in bodhi.buildsys.wait_for_tasks.
This fixes the broken test_edit_obsoletion test case
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py
index c8a6dd6..487af39 100644
--- a/bodhi/buildsys.py
+++ b/bodhi/buildsys.py
@@ -211,6 +211,9 @@ def wait_for_tasks(tasks, sleep=300):
log.debug("Waiting for %d tasks to complete: %s" % (len(tasks), tasks))
failed_tasks = []
for task in tasks:
+ if not task:
+ log.debug("Skipping task: %s" % task)
+ continue
while not session.taskFinished(task):
time.sleep(sleep)
task_info = session.getTaskInfo(task)
commit ff260dc14a2f61d9674b05c9606a99e821ab7696
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 11 17:22:51 2009 -0400
Minor test case tweak, for consistency purposes
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index 1affb95..de20041 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -118,7 +118,7 @@ class TestPackageUpdate(testutil.DBTest):
# Create another update for another release that has the same
# Release.id_prefix. This used to trigger a bug that would cause
# duplicate IDs across Fedora 10/11 updates.
- update = self.get_update(name='nethack-3.4.5-1.fc7')
+ update = self.get_update(name='nethack-3.4.5-1.fc11')
otherrel = Release(name='fc11', long_name='Fedora 11',
id_prefix='FEDORA', dist_tag='dist-fc11')
update.release = otherrel
14 years, 7 months
2 commits - bodhi/model.py bodhi/templates bodhi/tests
by Luke Macken
bodhi/model.py | 4 +++-
bodhi/templates/welcome.kid | 5 -----
bodhi/tests/test_model.py | 11 +++++++++++
3 files changed, 14 insertions(+), 6 deletions(-)
New commits:
commit ff2fa4f45b980f0ccbabb0dd40b213f25468f374
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 11 17:00:57 2009 -0400
Fix a bug that would cause duplicate update IDs across Fedora 10/11 (#515853)
This bug was introduced along with EPEL support, and causes updates for
releases that share the same Release.id_prefix to be assigned duplicate
update IDs.
This patch also contains a unit test for this problem.
diff --git a/bodhi/model.py b/bodhi/model.py
index 0806beb..1caaa8b 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -298,10 +298,12 @@ class PackageUpdate(SQLObject):
log.debug("Keeping current update id %s" % self.updateid)
return
+ releases = Release.select(Release.q.id_prefix == self.release.id_prefix)
updates = PackageUpdate.select(
AND(PackageUpdate.q.date_pushed != None,
PackageUpdate.q.updateid != None,
- PackageUpdate.q.releaseID == self.release.id),
+ OR(*[PackageUpdate.q.releaseID == rel.id
+ for rel in releases])),
orderBy=PackageUpdate.q.date_pushed, limit=1).reversed()
try:
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index 8e342f3..1affb95 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -115,6 +115,17 @@ class TestPackageUpdate(testutil.DBTest):
assert update.updateid == '%s-%s-0002' % (update.release.id_prefix,
time.localtime()[0])
+ # Create another update for another release that has the same
+ # Release.id_prefix. This used to trigger a bug that would cause
+ # duplicate IDs across Fedora 10/11 updates.
+ update = self.get_update(name='nethack-3.4.5-1.fc7')
+ otherrel = Release(name='fc11', long_name='Fedora 11',
+ id_prefix='FEDORA', dist_tag='dist-fc11')
+ update.release = otherrel
+ update.assign_id()
+ assert update.updateid == '%s-%s-0003' % (update.release.id_prefix,
+ time.localtime()[0])
+
# 10k bug
update.updateid = 'FEDORA-2009-9999'
newupdate = self.get_update(name='nethack-2.5.6-1.fc10')
commit f40a28a7de655c643dd4ed2c8a2af91e426610dc
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 11 16:51:27 2009 -0400
Actually remove the mugshot link this time
diff --git a/bodhi/templates/welcome.kid b/bodhi/templates/welcome.kid
index 4e488ef..62c602a 100644
--- a/bodhi/templates/welcome.kid
+++ b/bodhi/templates/welcome.kid
@@ -56,11 +56,6 @@
<a href="http://koji.fedoraproject.org/koji/" class="list"><font size="6">麹</font></a>
</span>
</td>
- <td>
- <span id="mugtip" title="Fedora Infrastructure Mugshot Group">
- <a href="http://mugshot.org/group?who=yWstkV2xGz93rQ"><img src="${tg.url('/static/images/mugshot.png')}" border="0" /></a>
- </span>
- </td>
</tr>
</table>
</td>
14 years, 7 months
bodhi/static
by Luke Macken
dev/null |binary
1 file changed
New commits:
commit 71038d3ffd628f07e0946afae2d3878f9c7dc938
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 7 11:41:51 2009 -0400
Remove the link to Mugshot, since it's dead.
diff --git a/bodhi/static/images/mugshot.png b/bodhi/static/images/mugshot.png
deleted file mode 100644
index 6f5b0fd..0000000
Binary files a/bodhi/static/images/mugshot.png and /dev/null differ
14 years, 7 months
2 commits - bodhi/model.py bodhi/tools
by Luke Macken
bodhi/model.py | 4 ++--
bodhi/tools/client.py | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 21e4430837d8a8f1bef8cfc7ace8dde4a27b0f5a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 4 15:27:38 2009 -0400
Add newlines between comments for the update mails (#329)
diff --git a/bodhi/model.py b/bodhi/model.py
index 8cb15b9..0806beb 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -565,8 +565,8 @@ class PackageUpdate(SQLObject):
if comment.text:
text = wrap(comment.text, initial_indent=' ' * 13,
subsequent_indent=' ' * 13, width=67)
- comments.append(u'\n'.join(text))
- val += u'\n'.join(comments).lstrip() + u'\n'
+ comments.append(u'\n'.join(text) + '\n')
+ val += u'\n'.join(comments).lstrip()
val += u"\n %s\n" % (config.get('base_address') + url(self.get_url()))
return val
commit 570f43affa0cd4ebb96ec60fa9c54faf249ea2c8
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 4 15:19:53 2009 -0400
Remove a stray print statement in the bodhi client
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 9f9c0ca..e648aa3 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -170,7 +170,6 @@ def main():
sys.exit(-1)
log.info("Creating a new update for %s" % args[0])
data = bodhi.save(**extra_args)
- print "data =", data
if data.get('tg_flash'):
log.info(data['tg_flash'])
if 'updates' in data:
14 years, 8 months