[Treepkg-commits] r541 - trunk/bin
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Sep 3 13:53:12 CEST 2011
Author: bricks
Date: 2011-09-03 13:53:12 +0200 (Sat, 03 Sep 2011)
New Revision: 541
Modified:
trunk/bin/publishdebianpackages.py
trunk/bin/publishpackages.py
trunk/bin/publishstaticweb.py
Log:
shlex.split all config parameters that may contain a command
Return the command as list and use @ operator for the variable in cmdexpand
Modified: trunk/bin/publishdebianpackages.py
===================================================================
--- trunk/bin/publishdebianpackages.py 2011-09-03 11:48:00 UTC (rev 540)
+++ trunk/bin/publishdebianpackages.py 2011-09-03 11:53:12 UTC (rev 541)
@@ -29,7 +29,8 @@
from treepkg.info.data import CacheDb
config_desc = ["distribution", "section", "num_newest",
- "build_user", "build_host", "build_listpackages",
+ "build_user", "build_host",
+ ("build_listpackages", shlex.split),
"publish_user", "publish_host",
("architectures", shlex.split, "armel i386 source"),
("after_upload_hook", shlex.split, ""),
@@ -76,7 +77,7 @@
def get_treepkg_info(variables):
runremote = prefix_for_remote_command(variables["build_user"],
variables["build_host"])
- xml = capture_stdout(cmdexpand("@runremote $build_listpackages"
+ xml = capture_stdout(cmdexpand("@runremote @build_listpackages"
" --newest=$num_newest"
" --only-successful",
runremote=runremote,
Modified: trunk/bin/publishpackages.py
===================================================================
--- trunk/bin/publishpackages.py 2011-09-03 11:48:00 UTC (rev 540)
+++ trunk/bin/publishpackages.py 2011-09-03 11:53:12 UTC (rev 541)
@@ -24,7 +24,8 @@
from treepkg.publish import prefix_for_remote_command, copy_to_publishdir
config_desc = ["distribution", "section", "num_newest",
- "build_user", "build_host", "build_listpackages",
+ "build_user", "build_host",
+ ("build_listpackages", shlex.split),
"publish_user", "publish_host",
("after_upload_hook", shlex.split),
("publish_remove_old_packages", convert_bool),
@@ -86,7 +87,7 @@
runremote = prefix_for_remote_command(variables["build_user"],
variables["build_host"])
- files = capture_output(cmdexpand("@runremote $build_listpackages"
+ files = capture_output(cmdexpand("@runremote @build_listpackages"
" @track @revision $pkgtype"
" --newest=$num_newest",
runremote=runremote,
Modified: trunk/bin/publishstaticweb.py
===================================================================
--- trunk/bin/publishstaticweb.py 2011-09-03 11:48:00 UTC (rev 540)
+++ trunk/bin/publishstaticweb.py 2011-09-03 11:53:12 UTC (rev 541)
@@ -9,6 +9,7 @@
"""Publishes a static web-site with a status report"""
import sys
+import shlex
import os
from optparse import OptionParser
from ConfigParser import SafeConfigParser
@@ -28,7 +29,8 @@
"""
return os.path.expandvars(os.path.expanduser(filename))
-staticweb_desc = ["build_user", "build_host", "build_create", "build_template",
+staticweb_desc = ["build_user", "build_host",
+ ("build_create", shlex.split), "build_template",
"build_logs",
("build_dir", remove_trailing_slashes),
"publish_user", "publish_host",
@@ -64,7 +66,7 @@
config = read_config(config_filename)
# create web-page on build host
- call(cmdexpand("ssh $build_user$@$build_host $build_create"
+ call(cmdexpand("ssh $build_user$@$build_host @build_create"
" --show-logs=$build_logs"
" --status-template=$build_template $build_dir",
**config))
More information about the Treepkg-commits
mailing list