bodhi.spec | 11 ++++++++++-
bodhi/metadata.py | 17 +++++++++++------
bodhi/model.py | 6 +++++-
bodhi/release.py | 2 +-
bodhi/tests/test_metadata.py | 3 +++
5 files changed, 30 insertions(+), 9 deletions(-)
New commits:
commit 8baddfcf92bfa8ad0a392fcf9c8d99a46b8149c1
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 14 11:26:55 2009 -0400
Ensure the bug title persists in our updateinfo (#493098)
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index 3a48d8c..e9bbab6 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -148,11 +148,14 @@ class ExtendedMetadata:
## Build the references
refs = self.doc.createElement('references')
for ref in notice._md['references']:
- self._insert(refs, 'reference', attrs={
- 'type' : ref['type'],
- 'href' : ref['href'],
- 'id' : ref['id']
- })
+ attrs = {
+ 'type' : ref['type'],
+ 'href' : ref['href'],
+ 'id' : ref['id'],
+ }
+ if ref.get('title'):
+ attrs['title'] = ref['title']
+ self._insert(refs, 'reference', attrs=attrs)
root.appendChild(refs)
## Errata description
diff --git a/bodhi/tests/test_metadata.py b/bodhi/tests/test_metadata.py
index ca7905d..c0db24d 100644
--- a/bodhi/tests/test_metadata.py
+++ b/bodhi/tests/test_metadata.py
@@ -111,6 +111,7 @@ class TestExtendedMetadata(testutil.DBTest):
update.addPackageBuild(build)
bug = Bugzilla(bz_id=1)
+ bug.title = u'test bug'
update.addBugzilla(bug)
cve = CVE(cve_id="CVE-2007-0000")
update.addCVE(cve)
@@ -152,6 +153,7 @@ class TestExtendedMetadata(testutil.DBTest):
assert bug['href'] == update.bugs[0].get_url()
assert bug['id'] == '1'
assert bug['type'] == 'bugzilla'
+ assert bug['title'] == 'test bug'
# FC6's yum update metadata parser doesn't know about some stuff
from yum import __version__
@@ -187,6 +189,7 @@ class TestExtendedMetadata(testutil.DBTest):
assert bug['href'] == update.bugs[0].get_url()
assert bug['id'] == '1'
assert bug['type'] == 'bugzilla'
+ assert bug['title'] == 'test bug', bug
# FC6's yum update metadata parser doesn't know about some stuff
from yum import __version__
commit ae01c865d190dd2d94dc006e8dd246c5b9823e02
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Sep 14 09:59:35 2009 -0400
Mutable default keyword arguments for the lose.
diff --git a/bodhi/metadata.py b/bodhi/metadata.py
index 8ce565e..3a48d8c 100644
--- a/bodhi/metadata.py
+++ b/bodhi/metadata.py
@@ -108,8 +108,10 @@ class ExtendedMetadata:
updates = self.doc.createElement('updates')
self.doc.appendChild(updates)
- def _insert(self, parent, name, attrs={}, text=None):
+ def _insert(self, parent, name, attrs=None, text=None):
""" Helper function to trivialize inserting an element into the
doc """
+ if not attrs:
+ attrs = {}
child = self.doc.createElement(name)
for item in attrs.items():
child.setAttribute(item[0], unicode(item[1]))
commit 64f9acdfd1ed8ee6008645c33b13550b04421b0b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 9 16:42:43 2009 -0400
0.6.7
diff --git a/bodhi.spec b/bodhi.spec
index 002bf0d..797bbd4 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.6
+Version: 0.6.7
Release: 1%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
@@ -115,6 +115,15 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Wed Sep 09 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.7-1
+- 0.6.7
+
+* Wed Sep 09 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.6-1
+- 0.6.6
+
+* Wed Sep 09 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.5-1
+- 0.6.5
+
* Fri Aug 14 2009 Luke Macken <lmacken(a)redhat.com> - 0.6.4-1
- 0.6.4
diff --git a/bodhi/release.py b/bodhi/release.py
index 53acf35..4db45d9 100644
--- a/bodhi/release.py
+++ b/bodhi/release.py
@@ -1,4 +1,4 @@
-VERSION = '0.6.6'
+VERSION = '0.6.7'
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 8a1fc5bcff92921a97f3ebcb95009a87723f5c93
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 9 16:40:52 2009 -0400
Make our bugzilla title handling a little more robust with regard to unicode
diff --git a/bodhi/model.py b/bodhi/model.py
index 1caaa8b..3a2fc01 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -895,7 +895,11 @@ class Bugzilla(SQLObject):
return
if bug.product == 'Security Response':
self.parent = True
- self.title = str(bug.short_desc)
+ try:
+ self.title = bug.short_desc
+ except Exception, e:
+ log.error("Unable to decode bug title: %s" % e)
+ self.title = 'Unable to decode bug title'
if 'security' in bug.keywords.lower():
self.security = True
Show replies by date