comparison treepkg/packager.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 5c06e0a0d329
children 5fda6768bef6
comparison
equal deleted inserted replaced
461:454967511f5c 462:058856954e2d
370 files = sorted(util.listdir_abs(self.binary_dir)) 370 files = sorted(util.listdir_abs(self.binary_dir))
371 return files 371 return files
372 372
373 def package(self): 373 def package(self):
374 try: 374 try:
375 util.ensure_directory(self.work_dir) 375 try:
376 self.status.start = datetime.datetime.utcnow() 376 util.ensure_directory(self.work_dir)
377 src_packager = self.source_packager_cls(self) 377 self.status.start = datetime.datetime.utcnow()
378 src_packager.package() 378 src_packager = self.source_packager_cls(self)
379 379 src_packager.package()
380 dsc_file = self.find_dsc_file() 380
381 if dsc_file is None: 381 dsc_file = self.find_dsc_file()
382 raise RuntimeError("Cannot find dsc File in %r" % self.src_dir) 382 if dsc_file is None:
383 383 raise RuntimeError("Cannot find dsc File in %r" % self.src_dir)
384 bin_packager = self.binary_packager_cls(self, dsc_file, self.build_log) 384
385 bin_packager.package() 385 bin_packager = self.binary_packager_cls(self, dsc_file, self.build_log)
386 self.status.stop = datetime.datetime.utcnow() 386 bin_packager.package()
387 self.status.stop = datetime.datetime.utcnow()
388 finally:
389 util.compress_all_logs(self.log_dir)
387 except: 390 except:
388 self.status.error() 391 self.status.error()
389 self.status.stop = datetime.datetime.utcnow() 392 self.status.stop = datetime.datetime.utcnow()
390 # set the notification status last to avoid race conditions. 393 # set the notification status last to avoid race conditions.
391 # The pending notification is for now the only situation 394 # The pending notification is for now the only situation
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)