[Treepkg-commits] r265 - in trunk: . bin treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Apr 13 11:29:10 CEST 2010
Author: aheinecke
Date: 2010-04-13 11:29:08 +0200 (Tue, 13 Apr 2010)
New Revision: 265
Modified:
trunk/bin/updatetreepkg.py
trunk/notification-template.txt
trunk/treepkg/builder.py
trunk/treepkg/packager.py
Log:
Changed the Build Logs to be gziped before they are published
Modified: trunk/bin/updatetreepkg.py
===================================================================
--- trunk/bin/updatetreepkg.py 2010-04-13 09:00:36 UTC (rev 264)
+++ trunk/bin/updatetreepkg.py 2010-04-13 09:29:08 UTC (rev 265)
@@ -60,11 +60,11 @@
# Originally, the build logs were called build.log and were
# in the base directory of a revision
rename_file(os.path.join(revision.base_dir, "build.log"),
- revision.build_log, dry_run)
+ revision.get_build_log(), dry_run)
# for a while, the build logs were called build_log.txt but
# still were in the base directory
rename_file(os.path.join(revision.base_dir, "build_log.txt"),
- revision.build_log, dry_run)
+ revision.get_build_log(), dry_run)
# Revision directories used to end with "-1". Now that number
# is the revision of the packaging rules which default to 0 for
# the traditional manual rules management without a version
Modified: trunk/notification-template.txt
===================================================================
--- trunk/notification-template.txt 2010-04-13 09:00:36 UTC (rev 264)
+++ trunk/notification-template.txt 2010-04-13 09:29:08 UTC (rev 265)
@@ -9,7 +9,7 @@
an error occurred while building the %(track)s packages for revision
%(revision)s. Details are available in the build log:
- http://example.com/treepkg/%(track)s/%(revision)s-%(rules_revision)s/build_log.txt
+ http://example.com/treepkg/%(track)s/%(revision)s-%(rules_revision)s/build_log.txt.gz
General information about the status of the packages is available at
Modified: trunk/treepkg/builder.py
===================================================================
--- trunk/treepkg/builder.py 2010-04-13 09:00:36 UTC (rev 264)
+++ trunk/treepkg/builder.py 2010-04-13 09:29:08 UTC (rev 265)
@@ -186,6 +186,8 @@
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))
# remove the source package files put into the binary directory
# by pbuilder
if binary_dir is not None:
Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py 2010-04-13 09:00:36 UTC (rev 264)
+++ trunk/treepkg/packager.py 2010-04-13 09:29:08 UTC (rev 265)
@@ -275,8 +275,13 @@
return None
def has_build_log(self):
- return os.path.exists(self.build_log)
+ return os.path.exists(self.get_log_file())
+ def get_log_file(self):
+ if os.path.exists(self.build_log + ".gz"):
+ return self.build_log + ".gz"
+ return self.build_log
+
def list_log_files(self):
"""Returns a list describing the logfiles available for the revision.
Each list item is a tuple of the form (TITLE, FILENAME) where
@@ -285,7 +290,7 @@
"""
files = []
if self.has_build_log():
- files.append(("build log", self.build_log))
+ files.append(("build log", self.get_log_file()))
return files
def list_source_files(self):
@@ -313,8 +318,7 @@
if dsc_file is None:
raise RuntimeError("Cannot find dsc File in %r" % self.src_dir)
- bin_packager = self.binary_packager_cls(self, dsc_file,
- self.build_log)
+ bin_packager = self.binary_packager_cls(self, dsc_file, self.build_log)
bin_packager.package()
self.status.stop = datetime.datetime.utcnow()
except:
More information about the Treepkg-commits
mailing list