Mercurial > treepkg > treepkg
comparison treepkg/builder.py @ 462:058856954e2d
Make the compress_all_logs call builder independent and also compress
if an error occurs before the builders are executed.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 31 Aug 2010 15:56:46 +0000 |
parents | 454967511f5c |
children |
comparison
equal
deleted
inserted
replaced
461:454967511f5c | 462:058856954e2d |
---|---|
204 util.ensure_directory(binary_dir) | 204 util.ensure_directory(binary_dir) |
205 for mount in bindmounts: | 205 for mount in bindmounts: |
206 args.extend(["--bindmounts", mount]) | 206 args.extend(["--bindmounts", mount]) |
207 for pkg in extra_packages: | 207 for pkg in extra_packages: |
208 args.extend(["--extrapackages", pkg]) | 208 args.extend(["--extrapackages", pkg]) |
209 try: | 209 run.call(cmdexpand("@rootcmd /usr/sbin/pbuilder build" |
210 run.call(cmdexpand("@rootcmd /usr/sbin/pbuilder build" | 210 " --configfile $pbuilderrc @args" |
211 " --configfile $pbuilderrc @args" | 211 " --debbuildopts -b $dsc", |
212 " --debbuildopts -b $dsc", | 212 rootcmd=self.root_cmd, pbuilderrc=self.pbuilderrc, |
213 rootcmd=self.root_cmd, pbuilderrc=self.pbuilderrc, | 213 dsc=dsc_file, args=args), |
214 dsc=dsc_file, args=args), | 214 suppress_output=True, |
215 suppress_output=True, | 215 extra_env=extra_env) |
216 extra_env=extra_env) | 216 |
217 except: | |
218 util.compress_all_logs(logfile) | |
219 raise | |
220 | |
221 util.compress_all_logs(logfile) | |
222 | |
223 # remove the source package files put into the binary directory | 217 # remove the source package files put into the binary directory |
224 # by pbuilder | 218 # by pbuilder |
225 if binary_dir is not None: | 219 if binary_dir is not None: |
226 for filename in os.listdir(binary_dir): | 220 for filename in os.listdir(binary_dir): |
227 if os.path.splitext(filename)[1] not in (".deb", ".changes"): | 221 if os.path.splitext(filename)[1] not in (".deb", ".changes"): |