bodhi/buildsys.py | 31 ++++++++++++++++++++++++++++++- bodhi/model.py | 4 ++++ bodhi/tests/test_controllers.py | 18 +++++++++++++++++- 3 files changed, 51 insertions(+), 2 deletions(-)
New commits: commit e446bb7ca65954b853aeb9914d3c7453e64de0c4 Author: Luke Macken lmacken@redhat.com Date: Mon Jul 12 16:00:30 2010 -0400
Disable our strict critpath policy for EPEL
diff --git a/bodhi/model.py b/bodhi/model.py index 1f4495a..187bec1 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -898,6 +898,10 @@ class PackageUpdate(SQLObject): @property def critpath(self): """ Return whether or not this update is in the critical path """ + # HACK: Avoid the current critpath policy for EPEL + if self.release.name.startswith('EL'): + return False + critical = False critpath_pkgs = config.get('critpath').split() for build in self.builds: diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py index 9989790..ed06a03 100644 --- a/bodhi/tests/test_controllers.py +++ b/bodhi/tests/test_controllers.py @@ -2198,4 +2198,20 @@ class TestControllers(testutil.DBTest): # Ensure the flag gets unset properly assert not PackageUpdate.byTitle(params['builds']).builds[0].package.suggest_reboot
- + def test_push_critpath_to_EPEL(self): + session = login() + rel = Release(name='EL5', long_name='Fedora EPEL 5', + id_prefix='FEDORA-EPEL', dist_tag='dist-5E-epel') + params = { + 'builds' : 'kernel-2.6.31-1.el5', + 'release' : 'Fedora EPEL 5', + 'type_' : 'bugfix', + 'bugs' : '', + 'notes' : 'foobar', + 'stable_karma' : 1, + 'request': 'stable', + 'unstable_karma' : -1, + } + self.save_update(params, session) + update = PackageUpdate.byTitle(params['builds']) + assert update.request == 'stable', update.request
commit 97cfb9e08ee1ba19b384cd50854791db8d438976 Author: Luke Macken lmacken@redhat.com Date: Mon Jul 12 15:46:49 2010 -0400
Add some EPEL data to our buildsystem test harness
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py index f0f9a0b..28dcea8 100644 --- a/bodhi/buildsys.py +++ b/bodhi/buildsys.py @@ -81,6 +81,26 @@ class DevBuildsys(Buildsystem): 'tag_name': 'dist-fc7-updates-testing', 'task_id': 127621, 'version': '1.0.2.2'} + + elif 'el5' in build: + return {'build_id': 16058, + 'completion_time': '2007-08-24 23:26:10.890319', + 'creation_event_id': 151517, + 'creation_time': '2007-08-24 19:38:29.422344', + 'epoch': None, + 'id': 16058, + 'name': 'kernel', + 'nvr': 'kernel-2.6.31-1.el5', + 'owner_id': 388, + 'owner_name': 'lmacken', + 'package_id': 8, + 'package_name': 'kernel', + 'release': '1.el5', + 'state': 1, + 'tag_id': 19, + 'tag_name': 'dist-5E-epel-testing-candidate', + 'task_id': 127621, + 'version': '2.6.31'} else: return {'build_id': 16058, 'completion_time': '2007-08-24 23:26:10.890319', @@ -135,6 +155,13 @@ class DevBuildsys(Buildsystem): 'name': 'dist-fc7-updates-testing', 'perm': None, 'perm_id': None}, {'arches': 'i386 x86_64 ppc ppc64', 'id': 5, 'locked': True, 'name': 'dist-fc7', 'perm': None, 'perm_id': None}] + elif 'el5' in build: + return [{'arches': 'i386 x86_64 ppc ppc64', 'id': 10, 'locked': True, + 'name': 'dist-5E-epel-testing-candidate', 'perm': None, 'perm_id': None}, + {'arches': 'i386 x86_64 ppc ppc64', 'id': 10, 'locked': True, + 'name': 'dist-5E-epel-testing-candidate', 'perm': None, 'perm_id': None}, + {'arches': 'i386 x86_64 ppc ppc64', 'id': 5, 'locked': True, + 'name': 'dist-5E-epel', 'perm': None, 'perm_id': None}] else: return [{'arches': 'i386 x86_64 ppc ppc64', 'id': 10, 'locked': True, 'name': 'dist-f8-updates-candidate', 'perm': None, 'perm_id': None}, @@ -150,7 +177,9 @@ class DevBuildsys(Buildsystem): 'dist-fc8', 'dist-fc8-updates', 'dist-fc8-updates-testing', 'dist-f8-updates-candidate', 'dist-f9', 'dist-f9-updates', 'dist-f9-updates-testing', - 'dist-f9-updates-candidate'): + 'dist-f9-updates-candidate', + 'dist-5E-epel-testing-candidate', 'dist-5E-epel', + 'dist-5E-epel-testing'): raise koji.GenericError return [self.getBuild(),]