[Treepkg-commits] r268 - in branches/scratchbox: . bin recipes/kde/enterprise treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Apr 14 11:38:30 CEST 2010
Author: bricks
Date: 2010-04-14 11:38:30 +0200 (Wed, 14 Apr 2010)
New Revision: 268
Modified:
branches/scratchbox/bin/publishstaticweb.py
branches/scratchbox/bin/updatetreepkg.py
branches/scratchbox/notification-template.txt
branches/scratchbox/recipes/kde/enterprise/generic.py
branches/scratchbox/treepkg/builder.py
branches/scratchbox/treepkg/packager.py
Log:
merged trunk changes into scratchbox branch
Modified: branches/scratchbox/bin/publishstaticweb.py
===================================================================
--- branches/scratchbox/bin/publishstaticweb.py 2010-04-13 09:53:19 UTC (rev 267)
+++ branches/scratchbox/bin/publishstaticweb.py 2010-04-14 09:38:30 UTC (rev 268)
@@ -44,11 +44,16 @@
parser = OptionParser()
parser.set_defaults(config_file=os.path.join(treepkgcmd.topdir,
"staticweb.cfg"))
+ parser.set_defaults(update_cache_only=False)
parser.add_option("--config-file",
help=("The configuration file. Default is staticweb.cfg"))
+ parser.add_option("--update-cache-only", action="store_true",
+ help=("Stop after updating the cache."
+ " This omits the last step of the publishing"
+ " process"))
return parser.parse_args()
-def publish_static_site(config_filename):
+def publish_static_site(config_filename, update_cache_only=False):
config = read_config(config_filename)
# create web-page on build host
@@ -62,14 +67,15 @@
" $cachedir",
**config))
- # rsync the web pages from the local cache to the publishing host
- call(cmdexpand("rsync -rL --delete $cachedir/"
- " $publish_user$@$publish_host:$publish_dir",
- **config))
+ if not update_cache_only:
+ # rsync the web pages from the local cache to the publishing host
+ call(cmdexpand("rsync -rL --delete $cachedir/"
+ " $publish_user$@$publish_host:$publish_dir",
+ **config))
def main():
options, args = parse_commandline()
- publish_static_site(options.config_file)
+ publish_static_site(options.config_file, options.update_cache_only)
main()
Modified: branches/scratchbox/bin/updatetreepkg.py
===================================================================
--- branches/scratchbox/bin/updatetreepkg.py 2010-04-13 09:53:19 UTC (rev 267)
+++ branches/scratchbox/bin/updatetreepkg.py 2010-04-14 09:38:30 UTC (rev 268)
@@ -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: branches/scratchbox/notification-template.txt
===================================================================
--- branches/scratchbox/notification-template.txt 2010-04-13 09:53:19 UTC (rev 267)
+++ branches/scratchbox/notification-template.txt 2010-04-14 09:38:30 UTC (rev 268)
@@ -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: branches/scratchbox/recipes/kde/enterprise/generic.py
===================================================================
--- branches/scratchbox/recipes/kde/enterprise/generic.py 2010-04-13 09:53:19 UTC (rev 267)
+++ branches/scratchbox/recipes/kde/enterprise/generic.py 2010-04-14 09:38:30 UTC (rev 268)
@@ -78,7 +78,8 @@
self.tag_revision = tag_revision
tag_date, tag_change_count = self.tag_pkg_parameters(tag_url)
pkg_revision = (self.pkg_revision_template
- % dict(pkg_revision=tag_change_count))
+ % dict(pkg_revision=tag_change_count,
+ rules_revision=revision[1]))
return self.revision_packager_cls(self, tag=tag_url,
pkg_revision=pkg_revision,
pkg_date=tag_date,
Modified: branches/scratchbox/treepkg/builder.py
===================================================================
--- branches/scratchbox/treepkg/builder.py 2010-04-13 09:53:19 UTC (rev 267)
+++ branches/scratchbox/treepkg/builder.py 2010-04-14 09:38:30 UTC (rev 268)
@@ -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: branches/scratchbox/treepkg/packager.py
===================================================================
--- branches/scratchbox/treepkg/packager.py 2010-04-13 09:53:19 UTC (rev 267)
+++ branches/scratchbox/treepkg/packager.py 2010-04-14 09:38:30 UTC (rev 268)
@@ -251,7 +251,8 @@
if pkg_revision is None:
pkg_revision = (self.track.pkg_revision_template
- % dict(pkg_revision=1))
+ % dict(pkg_revision=1,
+ rules_revision=rules_revision))
self.pkg_revision = pkg_revision
self.base_dir = self.track.pkg_dir_for_revision(self.revision,
@@ -275,8 +276,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 +291,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 +319,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