bodhi/config/app.cfg | 2 +-
bodhi/masher.py | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit e34e421586fe64385f5a0180de106ca40a08eaab
Author: Bill Nottingham <notting(a)redhat.com>
Date: Thu Mar 11 14:06:38 2010 -0500
Switch default to git for comps; rename config option.
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg
index 3bdf335..6a42e5d 100644
--- a/bodhi/config/app.cfg
+++ b/bodhi/config/app.cfg
@@ -37,7 +37,7 @@ jobs = 'cache_release_data refresh_metrics'
## Comps configuration
comps_dir = '/usr/share/bodhi/comps'
-comps_cvs = ':pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs'
+comps_url = 'git://git.fedorahosted.org/comps.git'
##
## Mirror settings
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 1260210..28c72fb 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -442,7 +442,7 @@ class MashTask(Thread):
"""
log.debug("Updating comps...")
comps_dir = config.get('comps_dir')
- comps_url = config.get('comps_cvs')
+ comps_url = config.get('comps_url')
if not exists(comps_dir):
if comps_url.startswith('git://'):
cmd = 'git clone %s' % (comps_url,)
commit 8050fd4dc49270370e439ade815e8f80db95db82
Author: Bill Nottingham <notting(a)redhat.com>
Date: Thu Mar 11 14:06:37 2010 -0500
Handle git as well as CVS locations for comps.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 5c0e178..1260210 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -442,11 +442,18 @@ class MashTask(Thread):
"""
log.debug("Updating comps...")
comps_dir = config.get('comps_dir')
+ comps_url = config.get('comps_cvs')
if not exists(comps_dir):
- cmd = 'cvs -d %s co comps' % config.get('comps_cvs')
+ if comps_url.startswith('git://'):
+ cmd = 'git clone %s' % (comps_url,)
+ else:
+ cmd = 'cvs -d %s co comps' % (comps_url,)
log.debug("running command: %s" % cmd)
subprocess.call(cmd, shell=True, cwd=comps_dir)
- subprocess.call('cvs update', shell=True, cwd=comps_dir)
+ if comps_url.startswith('git://'):
+ subprocess.call('git pull', shell=True, cwd=comps_dir)
+ else:
+ subprocess.call('cvs update', shell=True, cwd=comps_dir)
subprocess.call('make', shell=True, cwd=comps_dir)
def update_symlinks(self):
Show replies by date