[Treepkg-commits] r233 - in trunk: bin treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Dec 1 12:47:53 CET 2009
Author: bh
Date: 2009-12-01 12:47:52 +0100 (Tue, 01 Dec 2009)
New Revision: 233
Modified:
trunk/bin/runtreepkg.py
trunk/treepkg/packager.py
Log:
New command line argument --stop-on-error for runtreepkg.py and
corresponding parameter for PackagerGroup. If given, treepkg stops
immediately when a build-attempt fails.
Modified: trunk/bin/runtreepkg.py
===================================================================
--- trunk/bin/runtreepkg.py 2009-12-01 11:42:14 UTC (rev 232)
+++ trunk/bin/runtreepkg.py 2009-12-01 11:47:52 UTC (rev 233)
@@ -41,6 +41,9 @@
help=("Check the packagers only once and exit afterwards."
" Without this option, the tree packager will"
" check periodically."))
+ parser.add_option("--stop-on-error", action="store_true",
+ help=("Stop the tree packager when a packaging"
+ " attempt fails."))
parser.add_option("--revision",
help=("SVN revision to update to before attempting"
" to package."))
@@ -80,6 +83,7 @@
for opts in packager_opts],
revision=options.revision,
do_svn_update=not options.no_svn_update,
+ stop_on_error=options.stop_on_error,
**treepkg_opts)
if options.once:
group.check_package_tracks()
Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py 2009-12-01 11:42:14 UTC (rev 232)
+++ trunk/treepkg/packager.py 2009-12-01 11:47:52 UTC (rev 233)
@@ -567,11 +567,13 @@
class PackagerGroup(object):
def __init__(self, package_tracks, check_interval, revision=None,
- instructions_file=None, do_svn_update=True):
+ instructions_file=None, do_svn_update=True,
+ stop_on_error=False):
self.package_tracks = package_tracks
self.check_interval = check_interval
self.revision = revision
self.do_svn_update = do_svn_update
+ self.stop_on_error = stop_on_error
self.instructions_file = instructions_file
self.instructions_file_removed = False
self.sort_tracks()
@@ -659,6 +661,8 @@
except:
logging.exception("An error occurred while"
" checking packager track %r", track.name)
+ if self.stop_on_error:
+ raise
if repeat:
logging.info("Built binaries needed by other tracks."
" Starting over to ensure all dependencies"
More information about the Treepkg-commits
mailing list