[Treepkg-commits] r269 - trunk/treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Apr 14 15:17:31 CEST 2010
Author: aheinecke
Date: 2010-04-14 15:17:30 +0200 (Wed, 14 Apr 2010)
New Revision: 269
Modified:
trunk/treepkg/builder.py
Log:
Build logs are now also compressed when errors occur during building
Modified: trunk/treepkg/builder.py
===================================================================
--- trunk/treepkg/builder.py 2010-04-14 09:38:30 UTC (rev 268)
+++ trunk/treepkg/builder.py 2010-04-14 13:17:30 UTC (rev 269)
@@ -179,15 +179,22 @@
args.extend(["--bindmounts", mount])
for pkg in extra_packages:
args.extend(["--extrapackages", pkg])
- run.call(cmdexpand("@rootcmd /usr/sbin/pbuilder build"
- " --configfile $pbuilderrc @args"
- " --debbuildopts -b $dsc",
- rootcmd=self.root_cmd, pbuilderrc=self.pbuilderrc,
- dsc=dsc_file, args=args),
- suppress_output=True,
- extra_env=extra_env)
- if logfile is not None and os.path.exists(logfile):
- run.call(cmdexpand("gzip -9 $logfile", logfile=logfile))
+ try:
+ run.call(cmdexpand("@rootcmd /usr/sbin/pbuilder build"
+ " --configfile $pbuilderrc @args"
+ " --debbuildopts -b $dsc",
+ rootcmd=self.root_cmd, pbuilderrc=self.pbuilderrc,
+ dsc=dsc_file, args=args),
+ suppress_output=True,
+ extra_env=extra_env)
+ except:
+ if logfile is not None and os.path.exists(logfile):
+ run.call(cmdexpand("gzip -9 $logfile", logfile=logfile))
+ raise
+ else:
+ if logfile is not None and os.path.exists(logfile):
+ run.call(cmdexpand("gzip -9 $logfile", logfile=logfile))
+
# remove the source package files put into the binary directory
# by pbuilder
if binary_dir is not None:
More information about the Treepkg-commits
mailing list