aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2010-06-24 19:55:54 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2010-06-24 19:55:54 -0300
commitea05c55b70e1854f80a9543b6e209d96b7f29005 (patch)
tree12f2f13ea2586b655a941e8846debf287c3b1d9c /scripts
parentmore work in the SVN stuff. not works properly yet (diff)
downloadg-octave-ea05c55b70e1854f80a9543b6e209d96b7f29005.tar.gz
g-octave-ea05c55b70e1854f80a9543b6e209d96b7f29005.tar.bz2
g-octave-ea05c55b70e1854f80a9543b6e209d96b7f29005.zip
more work on the SVN stuff. previously done. commit delayed :(
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create_database.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/create_database.py b/scripts/create_database.py
index 2d35370..1c26da2 100755
--- a/scripts/create_database.py
+++ b/scripts/create_database.py
@@ -36,15 +36,15 @@ def main(argv):
temp_dir = tempfile.mkdtemp()
checkout_dir = os.path.join(temp_dir, 'checkout')
db_dir = os.path.join(temp_dir, 'db')
-
+ error = []
for category, pkg in svn.update_revisions():
cur_checkout_dir = os.path.join(checkout_dir, pkg)
os.makedirs(cur_checkout_dir)
- while 1:
- print 'Checking out the package: %s/%s' % (category, pkg)
- if svn.checkout_package(category, pkg, cur_checkout_dir, stable=True):
- break
- print 'An error was ocurred. Retrying ...'
+ print 'Checking out the package: %s/%s' % (category, pkg)
+ if not svn.checkout_package(category, pkg, cur_checkout_dir, stable=True):
+ error.append('%s/%s' % (category, pkg))
+ print 'An error was ocurred ...'
+ continue
# copying DESCRIPTION file for the package database
cur_db_dir = os.path.join(db_dir, category, pkg)
@@ -60,9 +60,11 @@ def main(argv):
shutil.move(cur_checkout_dir, new_checkout)
utils.create_tarball(
new_checkout,
- '%s-%s.tar.bz2' % (pkg, desc.version),
+ '%s/%s-%s.tar.bz2' % (conf.pkg_cache, pkg, desc.version),
'%s-%s' % (pkg, desc.version)
)
+ if len(error) > 0:
+ print 'Errors: %s' % ', '.join(error)
if __name__ == '__main__':