Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/pactest/util.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-05-17 18:47:30 -0500
committerDan McGee <dan@archlinux.org>2010-05-17 18:47:30 -0500
commita6ace987a913852af30bb5e3ae6bf145dc9c6157 (patch)
treebab1c477eda951edf1c9ea51103ae3b0f23060f2 /pactest/util.py
parent3a85f83840888cbab09f2413fa3eb7c3b71055e5 (diff)
Add some machinery to test the Include directive
After the previous patch that re-enabled its use outside of sync repository sections which we had unintentionally disabled. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'pactest/util.py')
-rwxr-xr-xpactest/util.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/pactest/util.py b/pactest/util.py
index da6d44e3..e01a3b8f 100755
--- a/pactest/util.py
+++ b/pactest/util.py
@@ -178,11 +178,14 @@ def mkcfgfile(filename, root, option, db):
data.extend(["%s = %s" % (key, j) for j in value])
# Repositories
- data.extend(["[%s]\n" \
- "Server = file://%s\n" \
- % (value.treename, \
- os.path.join(root, SYNCREPO, value.treename)) \
- for key, value in db.iteritems() if key != "local"])
+ for key, value in db.iteritems():
+ if key != "local":
+ data.append("[%s]\n" \
+ "Server = file://%s" \
+ % (value.treename,
+ os.path.join(root, SYNCREPO, value.treename)))
+ for optkey, optval in value.option.iteritems():
+ data.extend(["%s = %s" % (optkey, j) for j in optval])
mkfile(os.path.join(root, filename), "\n".join(data))