comparison treepkg/packager.py @ 336:5fa56edeb606

Changed the Build Logs to be gziped before they are published
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 13 Apr 2010 09:29:08 +0000
parents dd2bd0ccd674
children 28df50b267f6
comparison
equal deleted inserted replaced
335:85eb9425c346 336:5fa56edeb606
273 if filename.endswith(".dsc"): 273 if filename.endswith(".dsc"):
274 return os.path.join(self.src_dir, filename) 274 return os.path.join(self.src_dir, filename)
275 return None 275 return None
276 276
277 def has_build_log(self): 277 def has_build_log(self):
278 return os.path.exists(self.build_log) 278 return os.path.exists(self.get_log_file())
279
280 def get_log_file(self):
281 if os.path.exists(self.build_log + ".gz"):
282 return self.build_log + ".gz"
283 return self.build_log
279 284
280 def list_log_files(self): 285 def list_log_files(self):
281 """Returns a list describing the logfiles available for the revision. 286 """Returns a list describing the logfiles available for the revision.
282 Each list item is a tuple of the form (TITLE, FILENAME) where 287 Each list item is a tuple of the form (TITLE, FILENAME) where
283 TITLE is a string with a title usable in e. g. a web-page, and 288 TITLE is a string with a title usable in e. g. a web-page, and
284 FILENAME is the absolute filename of the log file. 289 FILENAME is the absolute filename of the log file.
285 """ 290 """
286 files = [] 291 files = []
287 if self.has_build_log(): 292 if self.has_build_log():
288 files.append(("build log", self.build_log)) 293 files.append(("build log", self.get_log_file()))
289 return files 294 return files
290 295
291 def list_source_files(self): 296 def list_source_files(self):
292 """Returns a list with the names of the files of the source package. 297 """Returns a list with the names of the files of the source package.
293 The implementation assumes that all files in self.src_dir belong 298 The implementation assumes that all files in self.src_dir belong
311 316
312 dsc_file = self.find_dsc_file() 317 dsc_file = self.find_dsc_file()
313 if dsc_file is None: 318 if dsc_file is None:
314 raise RuntimeError("Cannot find dsc File in %r" % self.src_dir) 319 raise RuntimeError("Cannot find dsc File in %r" % self.src_dir)
315 320
316 bin_packager = self.binary_packager_cls(self, dsc_file, 321 bin_packager = self.binary_packager_cls(self, dsc_file, self.build_log)
317 self.build_log)
318 bin_packager.package() 322 bin_packager.package()
319 self.status.stop = datetime.datetime.utcnow() 323 self.status.stop = datetime.datetime.utcnow()
320 except: 324 except:
321 self.status.error() 325 self.status.error()
322 self.status.stop = datetime.datetime.utcnow() 326 self.status.stop = datetime.datetime.utcnow()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)