bodhi.egg-info/entry_points.txt | 3 +++
bodhi.spec | 9 ++++++++-
bodhi/admin.py | 18 +++++++++++-------
bodhi/jobs.py | 2 +-
bodhi/masher.py | 18 ++++++++++++++----
bodhi/util.py | 1 +
setup.py | 3 +++
7 files changed, 41 insertions(+), 13 deletions(-)
New commits:
commit 27ee1006ff1efea72efe24b6580edec706d6ff45
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 20:28:55 2008 -0400
* Wed Sep 03 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.2-2
- Add the masher deps to BuildRequires, since it now resides
on the turbogears.extensions entry point and will be
imported by pkg_resources at build time.
diff --git a/bodhi.spec b/bodhi.spec
index 9c7f850..a10fd1e 100644
--- a/bodhi.spec
+++ b/bodhi.spec
@@ -3,7 +3,7 @@
Name: bodhi
Version: 0.5.2
-Release: 1%{?dist}
+Release: 10%{?dist}
Summary: A modular framework that facilitates publishing software updates
Group: Applications/Internet
License: GPLv2+
@@ -13,7 +13,9 @@ Source0: bodhi-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+BuildRequires: python-setuptools
BuildRequires: python-setuptools-devel
+BuildRequires: python-fedora python-TurboMail TurboGears yum
BuildRequires: python-devel
BuildRequires: TurboGears
@@ -108,6 +110,11 @@ rm -rf bodhi/tests bodhi/tools/test-bodhi.py
%changelog
+* Wed Sep 03 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.2-2
+- Add the masher deps to BuildRequires, since it now resides
+ on the turbogears.extensions entry point and will be
+ imported by pkg_resources at build time.
+
* Wed Sep 03 2008 Luke Macken <lmacken(a)redhat.com> - 0.5.2-1
- Latest upstream bugfix release
commit 6cc12910d633cdadd0a63d534fd472487e066a8e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 20:27:14 2008 -0400
Debugging statements are fun
diff --git a/bodhi/masher.py b/bodhi/masher.py
index be2589b..dd89470 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -725,6 +725,7 @@ class MashTask(Thread):
def start_extension():
global masher
+ log.info("Starting masher extension")
masher = Masher()
def shutdown_extension():
diff --git a/bodhi/util.py b/bodhi/util.py
index d618c46..4706c14 100644
--- a/bodhi/util.py
+++ b/bodhi/util.py
@@ -309,6 +309,7 @@ class Singleton(object):
def __new__(cls, *args, **kw):
if not '_instance' in cls.__dict__:
+ log.debug("Creating new singleton instance!")
cls._instance = object.__new__(cls)
return cls._instance
commit 81edec36bddbd7917b7b7e10a6e495c7174cad4e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 20:26:26 2008 -0400
Delay our metrics refresh a bit
diff --git a/bodhi/jobs.py b/bodhi/jobs.py
index 8501df4..ae37db3 100644
--- a/bodhi/jobs.py
+++ b/bodhi/jobs.py
@@ -178,5 +178,5 @@ def schedule():
log.debug("Scheduling refresh_metrics job")
scheduler.add_interval_task(action=refresh_metrics,
taskname='Refresh our metrics',
- initialdelay=0,
+ initialdelay=1200,
interval=172800)
commit bc5b92295376f53baf608b7085c5db94c0d10ddd
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 20:26:14 2008 -0400
Make the Masher a real turbogears.extension
diff --git a/bodhi.egg-info/entry_points.txt b/bodhi.egg-info/entry_points.txt
index be5abad..a92b426 100644
--- a/bodhi.egg-info/entry_points.txt
+++ b/bodhi.egg-info/entry_points.txt
@@ -1,3 +1,6 @@
+[turbogears.extensions]
+masher = bodhi.masher
+
[console_scripts]
bodhi-rmrelease = bodhi.tools.rmrelease:main
start-bodhi = bodhi.commands:start
diff --git a/setup.py b/setup.py
index 03cb807..f9f40a5 100644
--- a/setup.py
+++ b/setup.py
@@ -174,5 +174,8 @@ setup(
'bodhi-devinit = bodhi.tools.dev_init:main',
'bodhi-rmrelease = bodhi.tools.rmrelease:main',
),
+ 'turbogears.extensions': (
+ 'masher = bodhi.masher'
+ ),
}
)
commit a9bb756f273a5b326cf35f6c736ef3f9d5ac53ba
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 20:23:56 2008 -0400
Fix masher interaction from our AdminController
diff --git a/bodhi/admin.py b/bodhi/admin.py
index ee9a90f..a02e808 100644
--- a/bodhi/admin.py
+++ b/bodhi/admin.py
@@ -30,7 +30,6 @@ from fedora.tg.util import request_format
from fedora.client.proxyclient import ProxyClient
from bodhi.util import flash_log
-from bodhi.masher import Masher
from bodhi.model import Release, PackageUpdate
@@ -55,16 +54,18 @@ class AdminController(Controller, SecureResource):
data = {'masher_str': 'Unable to contact the
masher','tags': []}
return dict(masher_str=data['masher_str'],
tags=data['tags'])
else:
+ from bodhi.masher import masher
tags = []
for release in Release.select():
tags.append('%s-updates' %
release.dist_tag.split('-')[1])
tags.append('%s-updates-testing' %
release.dist_tag.split('-')[1])
- return dict(masher_str=str(Masher()), tags=tags)
+ return dict(masher_str=str(masher), tags=tags)
@expose(template='bodhi.templates.text')
def lastlog(self):
""" Return the last mash log """
- (logfile, data) = Masher().lastlog()
+ from bodhi.masher import masher
+ (logfile, data) = masher.lastlog()
return dict(title=logfile, text=data)
@expose(allow_json=True)
@@ -80,7 +81,8 @@ class AdminController(Controller, SecureResource):
flash_log("Mash request %s" %
data.get('success', 'failed'))
else:
- Masher().mash_tags([tag])
+ from bodhi.masher import masher
+ masher.mash_tags([tag])
flash_log("Mashing tag: %s" % tag)
raise redirect('/admin/masher')
@@ -135,8 +137,9 @@ class AdminController(Controller, SecureResource):
or 'failed')
raise redirect('/admin/masher')
- Masher().queue([PackageUpdate.byTitle(title) for title in updates],
- resume=resume)
+ from bodhi.masher import masher
+ masher.queue([PackageUpdate.byTitle(title) for title in updates],
+ resume=resume)
if request_format() == 'json':
return dict(success=True)
flash("Updates queued for mashing")
@@ -155,6 +158,7 @@ class AdminController(Controller, SecureResource):
def _current_mash(self):
""" Return details about the mash in process """
+ from bodhi.masher import masher
mash_data = {'mashing': False, 'updates': []}
mashed_dir = config.get('mashed_dir')
mash_lock = join(mashed_dir, 'MASHING')
@@ -162,7 +166,7 @@ class AdminController(Controller, SecureResource):
mash_lock = file(mash_lock)
mashing_updates = pickle.load(mash_lock)
mash_lock.close()
- mash_data['mashing'] = Masher().mashing
+ mash_data['mashing'] = masher.mashing
mash_data['updates'] = mashing_updates
return mash_data
commit f4d772f4f86f616936d64675a2a9cab8c32dcb7b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 18:38:12 2008 -0400
Make our Masher class *not* be a Singleton, since we keep one instance per
AdminController now.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index a05c6db..be2589b 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -30,7 +30,7 @@ from os.path import exists, join, islink, isdir, dirname
from time import sleep
from bodhi import buildsys, mail
-from bodhi.util import synchronized, sanity_check_repodata, Singleton
+from bodhi.util import synchronized, sanity_check_repodata
from bodhi.model import PackageUpdate
from bodhi.metadata import ExtendedMetadata
from bodhi.exceptions import MashTaskException
@@ -55,7 +55,7 @@ def get_mash_conf():
log.error("No mash configuration found!")
return None
-class Masher(Singleton):
+class Masher(object):
""" The Masher.
This is an extension that is in charge of queueing and dispatching update
commit bfc7e7df10bb5f4f949826f1a4f42753aee8f9f6
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 18:12:20 2008 -0400
Add another newkey hack to fix our repodata caching
diff --git a/bodhi/masher.py b/bodhi/masher.py
index f7307fc..a05c6db 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -668,6 +668,10 @@ class MashTask(Thread):
olduinfo = join(config.get('mashed_dir'), '%s.repodata' %
repo,
'i386', 'updateinfo.xml.gz')
olduinfo = exists(olduinfo) and olduinfo or None
+ if not olduinfo:
+ olduinfo = join(config.get('mashed_dir'), '%s.repodata' %
repo,
+ 'i386.newkey', 'updateinfo.xml.gz')
+ olduinfo = exists(olduinfo) and olduinfo or None
repo = join(mashdir, repo)
log.debug("Generating updateinfo.xml.gz for %s" % repo)
uinfo = ExtendedMetadata(repo, olduinfo)
commit 9c0704adb429b9a6eb4d8208d101070fca323076
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 17:57:19 2008 -0400
Make the sanity checks work with our normal tree, and the .newkey trees
diff --git a/bodhi/masher.py b/bodhi/masher.py
index aa91df8..f7307fc 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -416,7 +416,7 @@ class MashTask(Thread):
# make sure the new repository has our arches
for arch in config.get('arches').split():
- if arch not in arches + ['%s.newkey' % arch]:
+ if arch not in arches and arch not in [arch.split('.')[0] for
arch in arches]:
self.error_log("Cannot find arch %s in %s" % (arch,
newrepo))
return
@@ -572,11 +572,15 @@ class MashTask(Thread):
log.error("Exception thrown in MashTask %d" % self.id)
self.error_log(str(e))
log.exception(str(e))
- except MashTaskException:
+ except MashTaskException, e:
+ log.error("MashTaskException thrown! %s" % str(e))
self.success = False
if self.success:
+ log.debug("Success! Unlocking repo")
self._unlock()
+
+ log.debug("MashTask done")
masher.done(self)
def add_to_digest(self,update):
@@ -599,6 +603,7 @@ class MashTask(Thread):
Send digest mail to mailing lists
'''
for prefix, content in self.testing_digest.items():
+ log.debug("Sending digest for updates-testing %s" % prefix)
maildata = u'The following builds have been pushed to %s
updates-testing\n\n' % prefix
# get a list af all nvr's
updlist = content.keys()
commit abf681e95b11ce10c9abcbde77e7979821000e35
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 17:09:28 2008 -0400
Fix another lame typo
diff --git a/bodhi/masher.py b/bodhi/masher.py
index d06e046..aa91df8 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -416,7 +416,7 @@ class MashTask(Thread):
# make sure the new repository has our arches
for arch in config.get('arches').split():
- if arch not in arches + '%s.newkey' % arch:
+ if arch not in arches + ['%s.newkey' % arch]:
self.error_log("Cannot find arch %s in %s" % (arch,
newrepo))
return
commit be54111756f9415ec5337ab5bbac52366a784c4d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 14:47:43 2008 -0400
Fix some of our masher sanity checking to work with our newkey hack
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 3874837..d06e046 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -416,7 +416,7 @@ class MashTask(Thread):
# make sure the new repository has our arches
for arch in config.get('arches').split():
- if arch not in arches:
+ if arch not in arches + '%s.newkey' % arch:
self.error_log("Cannot find arch %s in %s" % (arch,
newrepo))
return