[Treepkg-commits] r54 - in trunk: test treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri May 23 18:31:58 CEST 2008
Author: bh
Date: 2008-05-23 18:31:58 +0200 (Fri, 23 May 2008)
New Revision: 54
Modified:
trunk/test/test_readconfig.py
trunk/treepkg/readconfig.py
Log:
Add the handle_dependencies Option for the config file. Extend the test
cases accordingly
Modified: trunk/test/test_readconfig.py
===================================================================
--- trunk/test/test_readconfig.py 2008-05-23 16:11:22 UTC (rev 53)
+++ trunk/test/test_readconfig.py 2008-05-23 16:31:58 UTC (rev 54)
@@ -29,6 +29,7 @@
deb_email: treepkg at example.com
deb_fullname: TreePKG
debrevision_prefix: treepkg
+handle_dependencies: False
[treepkg]
instructions_file: %(treepkg_dir)s/instructions
@@ -38,6 +39,7 @@
svn_url: svn://example.com/%(name)s/trunk
base_dir: %(tracks_dir)s/%(name)s
packager_class: readconfig_test.%(name)s
+handle_dependencies: True
[pkg_extraargs]
svn_url: svn://example.com/%(name)s/trunk
@@ -81,6 +83,7 @@
deb_email="treepkg at example.com",
deb_fullname="TreePKG",
debrevision_prefix="treepkg",
+ handle_dependencies=False,
packager_class="readconfig_test.extraargs",
pbuilderrc="/home/builder/mill/pbuilder/pbuilderrc",
root_cmd=['sudo'],
@@ -92,6 +95,7 @@
deb_email="treepkg at example.com",
deb_fullname="TreePKG",
debrevision_prefix="treepkg",
+ handle_dependencies=True,
packager_class="readconfig_test.simple",
pbuilderrc="/home/builder/mill/pbuilder/pbuilderrc",
root_cmd=['sudo'],
Modified: trunk/treepkg/readconfig.py
===================================================================
--- trunk/treepkg/readconfig.py 2008-05-23 16:11:22 UTC (rev 53)
+++ trunk/treepkg/readconfig.py 2008-05-23 16:31:58 UTC (rev 54)
@@ -14,12 +14,21 @@
import util
import packager
+def convert_bool(s):
+ s = s.lower()
+ if s in ("true", "yes", "1"):
+ return True
+ if s in ("false", "no", "0"):
+ return False
+ raise ValueError("cannot determine boolean value of %r" % (s,))
+
defaults = dict(root_cmd="sudo")
packager_desc = [
"name", "base_dir", "svn_url", "packager_class",
("root_cmd", shlex.split), "pbuilderrc",
"deb_email", "deb_fullname", "debrevision_prefix",
+ ("handle_dependencies", convert_bool),
]
treepkg_desc = [
More information about the Treepkg-commits
mailing list