3 commits - bodhi.egg-info/PKG-INFO bodhi.egg-info/SOURCES.txt bodhi/model.py bodhi/release.py bodhi.spec bodhi/tests
by Luke Macken
bodhi.egg-info/PKG-INFO | 2 +-
bodhi.egg-info/SOURCES.txt | 2 ++
bodhi.spec | 5 ++++-
bodhi/model.py | 38 +++++++++++++++++++++++++++++++-------
bodhi/release.py | 2 +-
bodhi/tests/test_metadata.py | 6 +++---
bodhi/tests/test_model.py | 27 +++++++++++++++++++++++++--
7 files changed, 67 insertions(+), 15 deletions(-)
New commits:
commit 471d3a5e48aa615f6f94dbb6c10f71771ec3a69f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Nov 24 13:31:53 2008 -0500
Fix some unit tests that broke due to our date_pushed change
diff --git a/bodhi/tests/test_metadata.py b/bodhi/tests/test_metadata.py
index 904ebbe..5424500 100644
--- a/bodhi/tests/test_metadata.py
+++ b/bodhi/tests/test_metadata.py
@@ -70,7 +70,7 @@ class TestExtendedMetadata(testutil.DBTest):
assert notice['updated'] == update.date_modified
assert notice['from'] == str(config.get('bodhi_email'))
assert notice['description'] == update.notes
- assert notice['issued'] == 'None'
+ assert notice['issued'] != None
assert notice['update_id'] == update.updateid
cve = notice['references'][0]
assert cve['type'] == 'cve'
@@ -141,7 +141,7 @@ class TestExtendedMetadata(testutil.DBTest):
assert notice['updated'] == update.date_modified
assert notice['from'] == str(config.get('bodhi_email'))
assert notice['description'] == update.notes
- assert notice['issued'] == 'None'
+ assert notice['issued'] != None
assert notice['update_id'] == update.updateid
cve = notice['references'][0]
assert cve['type'] == 'cve'
@@ -176,7 +176,7 @@ class TestExtendedMetadata(testutil.DBTest):
assert notice['updated'] == update.date_modified
assert notice['from'] == str(config.get('bodhi_email'))
assert notice['description'] == update.notes
- assert notice['issued'] == 'None'
+ assert notice['issued'] != None
assert notice['update_id'] == update.updateid
cve = notice['references'][0]
assert cve['type'] == 'cve'
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index eab511e..91ae71e 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -253,10 +253,11 @@ class TestPackageUpdate(testutil.DBTest):
build.get_rpm_header = rpm_header
build.get_latest = latest
+ update.date_pushed = None
templates = get_template(update)
assert templates
assert templates[0][0] == u'[SECURITY] Fedora 7 Test Update: TurboGears-1.0.2.2-2.fc7'
- assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\ndescription\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing-newkey update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...'
+ assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\ndescription\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...', templates[0][1]
def test_latest(self):
update = self.get_update(name='yum-3.2.1-1.fc7')
@@ -512,10 +513,11 @@ class TestPackageUpdate(testutil.DBTest):
build.get_rpm_header = rpm_header
build.get_latest = latest
+ update.date_pushed = None
templates = get_template(update)
assert templates
assert templates[0][0] == u'[SECURITY] Fedora 7 Test Update: TurboGears-1.0.2.2-2.fc7'
- assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\nZ\u2019s\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing-newkey update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...'
+ assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\nZ\u2019s\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...'
class TestBugzilla(testutil.DBTest):
commit 10291ebb88c628876ff1d89264ffa9297e527d9f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Nov 22 18:27:40 2008 -0500
Righteous hack for the 10k bug.
Due to a flaw in the way the PackageUpdate.assign_id method finds the update
with the highest id, when we reached 10,000 updates this year, it started to
fail. The previous method ordered updates by the updateid string column, which
now fails since u'FEDORA-2008-10000' < u'FEDORA-2008-9999'.
This patch changes this query to grab the most recent update based on the
date_pushed column. This technically should also have the highest updateid.
However, since SQLObject completely ignores milliseconds, we need to also
take into account multiple updates being pushed during the same second.
This changeset also includes a testcase for the 10k bug.
diff --git a/bodhi/model.py b/bodhi/model.py
index 2bc7c07..8767c43 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -258,19 +258,37 @@ class PackageUpdate(SQLObject):
if self.updateid != None and self.updateid != u'None':
log.debug("Keeping current update id %s" % self.updateid)
return
- update = PackageUpdate.select(PackageUpdate.q.updateid != 'None',
- orderBy=PackageUpdate.q.updateid)
+
+ updates = PackageUpdate.select(
+ AND(PackageUpdate.q.date_pushed != None,
+ PackageUpdate.q.updateid != None),
+ orderBy=PackageUpdate.q.date_pushed, limit=1).reversed()
+
try:
- prefix, year, id = update[-1].updateid.split('-')
+ update = updates[0]
+
+ # We need to check if there are any other updates that were pushed
+ # at the same time, since SQLObject ignores milliseconds
+ others = PackageUpdate.select(
+ PackageUpdate.q.date_pushed == update.date_pushed)
+ if others.count() > 1:
+ # find the update with the highest id
+ for other in others:
+ if other.updateid_int > update.updateid_int:
+ update = other
+
+ prefix, year, id = update.updateid.split('-')
if int(year) != time.localtime()[0]: # new year
id = 0
id = int(id) + 1
- except (AttributeError, IndexError):
- id = 1
+ except IndexError:
+ id = 1 # First update
+
self.updateid = u'%s-%s-%0.4d' % (self.release.id_prefix,
time.localtime()[0],id)
log.debug("Setting updateid for %s to %s" % (self.title,
self.updateid))
+ self.date_pushed = datetime.utcnow()
hub.commit()
def set_request(self, action, pathcheck=True):
@@ -356,7 +374,6 @@ class PackageUpdate(SQLObject):
"""
if self.request == 'testing':
self.pushed = True
- self.date_pushed = datetime.utcnow()
self.status = 'testing'
self.assign_id()
elif self.request == 'obsolete':
@@ -364,7 +381,6 @@ class PackageUpdate(SQLObject):
self.status = 'obsolete'
elif self.request == 'stable':
self.pushed = True
- self.date_pushed = datetime.utcnow()
self.status = 'stable'
self.assign_id()
self.request = None
@@ -742,6 +758,14 @@ class PackageUpdate(SQLObject):
sorted.sort(lambda x, y: cmp(x.timestamp, y.timestamp))
return sorted
+ @property
+ def updateid_int(self):
+ """ Return the integer $ID from the 'FEDORA-2008-$ID' updateid """
+ if not self.updateid:
+ return None
+ prefix, year, id = self.updateid.split('-')
+ return int(id)
+
class Comment(SQLObject):
timestamp = DateTimeCol(default=datetime.utcnow)
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index b654fe8..eab511e 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -109,11 +109,32 @@ class TestPackageUpdate(testutil.DBTest):
update.assign_id()
assert update.updateid == '%s-%s-0001' % (update.release.id_prefix,
time.localtime()[0])
+ assert update.date_pushed
update = self.get_update(name='TurboGears-0.4.4-8.fc7')
update.assign_id()
assert update.updateid == '%s-%s-0002' % (update.release.id_prefix,
time.localtime()[0])
+ # 10k bug
+ update.updateid = 'FEDORA-2008-9999'
+ newupdate = self.get_update(name='nethack-2.5.6-1.fc10')
+ newupdate.assign_id()
+ assert newupdate.updateid == 'FEDORA-2008-10000'
+
+ newerupdate = self.get_update(name='nethack-2.5.7-1.fc10')
+ newerupdate.assign_id()
+ assert newerupdate.updateid == 'FEDORA-2008-10001'
+
+ # test updates that were pushed at the same time. assign_id should
+ # be able to figure out which one has the highest id.
+ now = datetime.utcnow()
+ newupdate.date_pushed = now
+ newerupdate.date_pushed = now
+
+ newest = self.get_update(name='nethack-2.5.8-1.fc10')
+ newest.assign_id()
+ assert newest.updateid == 'FEDORA-2008-10002'
+
def test_url(self):
update = self.get_update()
print "URL = ", update.get_url()
commit 3cbc992f54453e8d3cc254e29143f8f9d53bc22a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Nov 21 13:41:55 2008 -0500
0.5.11
diff --git a/bodhi.egg-info/PKG-INFO b/bodhi.egg-info/PKG-INFO
index f0365e1..195bd60 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.5.9
+Version: 0.5.11
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 02c1fc9..ddc3168 100644
--- a/bodhi.egg-info/SOURCES.txt
+++ b/bodhi.egg-info/SOURCES.txt
@@ -39,6 +39,8 @@ bodhi.egg-info/sqlobject.txt
bodhi.egg-info/top_level.txt
bodhi/config/__init__.py
bodhi/config/app.cfg
+bodhi/config/f10-updates-testing.mash
+bodhi/config/f10-updates.mash
bodhi/config/f7-updates-testing.mash
bodhi/config/f7-updates.mash
bodhi/config/f8-updates-testing.mash
diff --git a/bodhi.spec b/bodhi.spec
index 79469e2..2cacb87 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.5.10
+Version: 0.5.11
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -113,6 +113,9 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Fri Nov 21 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.11-1
+- Various F10 release tweaks
+
* Fri Oct 24 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.10-3
- Latest upstream release
diff --git a/bodhi/release.py b/bodhi/release.py
index c2a3af8..2addce3 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.5.10'
+VERSION = '0.5.11'
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'
15 years, 5 months
bodhi/mail.py bodhi/model.py
by Luke Macken
bodhi/mail.py | 5 ++++-
bodhi/model.py | 11 ++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
New commits:
commit 95d9aaec39afb13ad05d261d4fc24dac7ba0a253
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Nov 21 13:39:11 2008 -0500
Add some more -newkey hacks.
diff --git a/bodhi/mail.py b/bodhi/mail.py
index 8d21f13..ac4561b 100644
--- a/bodhi/mail.py
+++ b/bodhi/mail.py
@@ -286,7 +286,10 @@ def get_template(update, use_template=errata_template):
info['url'] = h[rpm.RPMTAG_URL]
if update.status == 'testing':
info['testing'] = ' Test'
- info['yum_repository'] = ' --enablerepo=updates-testing-newkey'
+ if update.release.name in ('F9', 'F8'):
+ info['yum_repository'] = ' --enablerepo=updates-testing-newkey'
+ else:
+ info['yum_repository'] = ' --enablerepo=updates-testing'
else:
info['testing'] = ''
info['yum_repository'] = ''
diff --git a/bodhi/model.py b/bodhi/model.py
index 61b1c51..2bc7c07 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -833,11 +833,16 @@ class Bugzilla(SQLObject):
message = self.default_msg % (update.get_title(delim=', '), "%s %s" %
(update.release.long_name, update.status))
if update.status == "testing":
+ if update.release.name in ('F9', 'F8'):
+ repo = 'updates-testing-newkey'
+ else:
+ repo = 'updates-testing'
message += ("\n If you want to test the update, you can install " +
- "it with \n su -c 'yum --enablerepo=updates-testing-newkey " +
+ "it with \n su -c 'yum --enablerepo=%s " +
"update %s'. You can provide feedback for this " +
- "update here: %s") % (' '.join([build.package.name for
- build in update.builds]),
+ "update here: %s") % (repo,
+ ' '.join([build.package.name for build in
+ update.builds]),
config.get('base_address') + url(update.get_url()))
return message
15 years, 5 months
bodhi/masher.py
by Luke Macken
bodhi/masher.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 7174facc8a1d282c51d5a8d9882561cfafb80463
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Nov 21 13:34:48 2008 -0500
Hack around our .newkey hack for F10.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index f98074c..c0c599c 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -446,11 +446,12 @@ class MashTask(Thread):
arches = os.listdir(newrepo)
# HACK.
- log.debug("Moving each arch to arch.newkey")
- for arch in arches:
- if not arch.endswith('.newkey'):
- shutil.move(join(newrepo, arch), join(newrepo, '%s.newkey' % arch))
- arches = os.listdir(newrepo)
+ if 'f9' in repo or 'f8' in repo:
+ log.debug("Moving each arch to arch.newkey")
+ for arch in arches:
+ if not arch.endswith('.newkey'):
+ shutil.move(join(newrepo, arch), join(newrepo, '%s.newkey' % arch))
+ arches = os.listdir(newrepo)
log.debug("Running sanity checks on %s" % newrepo)
15 years, 5 months
bodhi/config
by Luke Macken
bodhi/config/f10-updates-testing.mash | 15 +++++++++++++++
bodhi/config/f10-updates.mash | 15 +++++++++++++++
2 files changed, 30 insertions(+)
New commits:
commit 50894514a2cd85db5d0170b0aecf174ac3652eeb
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Nov 21 13:27:29 2008 -0500
Add the Fedora 10 mash configs
diff --git a/bodhi/config/f10-updates-testing.mash b/bodhi/config/f10-updates-testing.mash
new file mode 100644
index 0000000..4a2cffc
--- /dev/null
+++ b/bodhi/config/f10-updates-testing.mash
@@ -0,0 +1,15 @@
+# mash config file
+
+[f10-updates-testing]
+rpm_path = %(arch)s/
+source_path = SRPMS/
+debuginfo = True
+multilib = True
+multilib_method = devel
+tag = dist-f10-updates-testing
+inherit = False
+strict_keys = True
+keys = 0B86274E
+repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/testing/10/%(a...
+repoviewtitle = "Fedora 10 Updates Testing - %(arch)s"
+arches = i386 x86_64 ppc ppc64
diff --git a/bodhi/config/f10-updates.mash b/bodhi/config/f10-updates.mash
new file mode 100644
index 0000000..0ec550a
--- /dev/null
+++ b/bodhi/config/f10-updates.mash
@@ -0,0 +1,15 @@
+# mash config file
+
+[f10-updates]
+rpm_path = %(arch)s/
+source_path = SRPMS/
+debuginfo = True
+multilib = True
+multilib_method = devel
+tag = dist-f10-updates
+inherit = False
+strict_keys = True
+keys = 4EBFC273
+repoviewurl = http://download.fedoraproject.org/pub/fedora/linux/updates/10/%(arch)s/
+repoviewtitle = "Fedora 10 Updates - %(arch)s"
+arches = i386 x86_64 ppc ppc64
15 years, 5 months
bodhi/tools
by Luke Macken
bodhi/tools/client.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 57d273e7f1b9cfd38ced0dc76255bf63f5af06df
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Nov 21 13:18:50 2008 -0500
Print each release above the list of pending requests
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 4c8882b..2a2bbfb 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -200,6 +200,7 @@ def main():
if len(updates):
log.info("\n" + status.title() + "\n========")
for release in releases:
+ log.info(release)
for update in releases[release]:
log.info("%s" % update['title'])
log.info('')
15 years, 5 months
bodhi/tools
by Luke Macken
bodhi/tools/client.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit eb8807e803ec43f1dc11ef332f4c161dcde4b59b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Nov 21 13:12:54 2008 -0500
More efficient implementation of the previous commit
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index f66e8a8..4c8882b 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -194,9 +194,8 @@ def main():
data['updates'])
releases = {}
for update in updates:
- if not update['release']['name'] in releases:
- releases[update['release']['name']] = []
- releases[update['release']['name']].append(update)
+ releases.setdefault(update['release']['name'], []) \
+ .append(update)
if len(updates):
log.info("\n" + status.title() + "\n========")
15 years, 5 months
bodhi/tools
by Luke Macken
bodhi/tools/client.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit a80357ef15479f9bd7db0ab3d5809e9a2bb2f07b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Nov 21 13:08:52 2008 -0500
Sort the list of requests by release, in the bodhi-client
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 6b46aec..f66e8a8 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -192,10 +192,18 @@ def main():
for status in ('testing', 'stable', 'obsolete'):
updates = filter(lambda x: x['request'] == status,
data['updates'])
+ releases = {}
+ for update in updates:
+ if not update['release']['name'] in releases:
+ releases[update['release']['name']] = []
+ releases[update['release']['name']].append(update)
+
if len(updates):
log.info("\n" + status.title() + "\n========")
- for update in updates:
- log.info("%s" % update['title'])
+ for release in releases:
+ for update in releases[release]:
+ log.info("%s" % update['title'])
+ log.info('')
## Confirm that we actually want to push these updates
sys.stdout.write("\nPush these updates? [n]")
15 years, 5 months
bodhi/templates
by Luke Macken
bodhi/templates/welcome.kid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c7ea629dfbf02cc957dc958425973edcf887d5e0
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Nov 19 11:52:54 2008 -0500
Fix a typo on the welcome page (#469985)
diff --git a/bodhi/templates/welcome.kid b/bodhi/templates/welcome.kid
index d162220..4e488ef 100644
--- a/bodhi/templates/welcome.kid
+++ b/bodhi/templates/welcome.kid
@@ -75,7 +75,7 @@
<tr>
<td>
<span py:if="updates">
- <h3><span py:replace="tg.identity.anonymous and 'Latest' or '%s\'' % (hasattr(tg.identity, 'user_name') and tg.identity.user_name or tg.identity.user.user_name)"></span> Updates</h3>
+ <h3><span py:replace="tg.identity.anonymous and 'Latest' or '%s\'s' % (hasattr(tg.identity, 'user_name') and tg.identity.user_name or tg.identity.user.user_name)"></span> Updates</h3>
${updates.display()}
</span>
</td>
15 years, 5 months
bodhi/tools
by Luke Macken
bodhi/tools/client.py | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
New commits:
commit e8e6b4778886b1cd20186110aa13a5663d89a020
Author: Luke Macken <lmacken(a)redhat.com>
Date: Sat Nov 15 13:30:46 2008 -0500
Remove the validate_auth hacks, as this /should/ properly throw an AuthError now.
diff --git a/bodhi/tools/client.py b/bodhi/tools/client.py
index 61f5df5..6b46aec 100755
--- a/bodhi/tools/client.py
+++ b/bodhi/tools/client.py
@@ -121,11 +121,6 @@ def main():
log.error("Please specifiy a comma-separated list of builds")
sys.exit(-1)
- def validate_auth(data):
- """ Hack, until we properly handle exceptions in our base client """
- if 'message' in data and data['message'] == u'You must provide your credentials before accessing this resource.':
- raise AuthError(data['message'])
-
while True:
try:
if opts.new:
@@ -145,8 +140,6 @@ def main():
if 'updates' in data:
for update in data['updates']:
log.info(bodhi.update_str(update))
- else:
- validate_auth(data)
else:
verify_args(args)
extra_args = {
@@ -167,8 +160,6 @@ def main():
if 'updates' in data:
for update in data['updates']:
log.info(bodhi.update_str(update))
- else:
- validate_auth(data)
elif opts.edit:
verify_args(args)
log.info("Editing update for %s" % args[0])
@@ -176,20 +167,17 @@ def main():
bugs=opts.bugs, notes=opts.notes,
request=opts.request)
log.info(data['tg_flash'])
- validate_auth(data)
if data.has_key('update'):
log.info(data['update'])
elif opts.request:
verify_args(args)
data = bodhi.request(update=args[0], request=opts.request)
- validate_auth(data)
log.info(data['tg_flash'])
if data.has_key('update'):
log.info(data['update'])
elif opts.delete:
verify_args(args)
data = bodhi.delete(update=args[0])
- validate_auth(data)
log.info(data['tg_flash'])
elif opts.push:
data = bodhi.push()
@@ -235,7 +223,6 @@ def main():
karma=opts.karma)
if data['tg_flash']:
log.info(data['tg_flash'])
- validate_auth(data)
if data.has_key('update'):
log.info(data['update'])
elif opts.latest:
@@ -253,6 +240,7 @@ def main():
data = bodhi.query(mine=opts.mine)
for update in data['updates']:
log.info(bodhi.update_str(update, minimal=True))
+ log.debug(data)
log.info(data['title'])
elif opts.status or opts.bugs or opts.release or opts.type_ or \
opts.mine or args:
15 years, 5 months
bodhi/tests
by Luke Macken
bodhi/tests/test_model.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit e1bb75e9d80556733aac9addc3156452c282f44a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Nov 11 10:21:48 2008 -0500
Fix a test case
diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py
index 4acf50a..b654fe8 100644
--- a/bodhi/tests/test_model.py
+++ b/bodhi/tests/test_model.py
@@ -235,7 +235,7 @@ class TestPackageUpdate(testutil.DBTest):
templates = get_template(update)
assert templates
assert templates[0][0] == u'[SECURITY] Fedora 7 Test Update: TurboGears-1.0.2.2-2.fc7'
- assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\ndescription\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...'
+ assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\ndescription\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing-newkey update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...'
def test_latest(self):
update = self.get_update(name='yum-3.2.1-1.fc7')
@@ -424,7 +424,6 @@ class TestPackageUpdate(testutil.DBTest):
log = testutil.get_log()
assert "[old_testing] Nagging foo(a)bar.com about TurboGears-1.0.2.2-2.fc7" in log
-
def test_old_pending_nagmail(self):
update = self.get_update()
update.status = 'pending'
@@ -495,7 +494,7 @@ class TestPackageUpdate(testutil.DBTest):
templates = get_template(update)
assert templates
assert templates[0][0] == u'[SECURITY] Fedora 7 Test Update: TurboGears-1.0.2.2-2.fc7'
- assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\nZ\u2019s\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...'
+ assert templates[0][1] == u'--------------------------------------------------------------------------------\nFedora Test Update Notification\nFEDORA-2008-0001\nNone\n--------------------------------------------------------------------------------\n\nName : TurboGears\nProduct : Fedora 7\nVersion : 1.0.2.2\nRelease : 2.fc7\nURL : turbogears.org\nSummary : summary\nDescription :\nZ\u2019s\n\n--------------------------------------------------------------------------------\nUpdate Information:\n\nfoobar\n--------------------------------------------------------------------------------\nReferences:\n\n [ 1 ] Bug #1 - None\n https://bugzilla.redhat.com/show_bug.cgi?id=1\n [ 2 ] CVE-2007-0000\n http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0000\n--------... update can be installed with the "yum" update program. Use \nsu -c \'yum --enablerepo=updates-testing-newkey update TurboGears\' at the command line.\nFor more information, refer to "Managing Software with yum",\navailable at http://docs.fedoraproject.org/yum/.\n\nAll packages are signed with the Fedora Project GPG key. More details on the\nGPG keys used by the Fedora Project can be found at\nhttp://fedoraproject.org/keys\n--------------------------------------...'
class TestBugzilla(testutil.DBTest):
15 years, 5 months