import repository from arizona
[raven.git] / apps / ravenpublish / arizonaconfig_compat.py
1 """arizonaconfig
2    options=[["-C",   "--configfile",    "configfile",    "store",      "string", "/usr/local/raven/etc/raven-stork.conf",        "FILE", "use a different config file (/usr/local/raven/etc/raven-stork.conf is the default)"],
3             ]
4
5    includes=["repobackend.py", "repometafileupdate.py", "repoconfig.py", "storkpackage.py"]
6 """
7
8 import arizonaconfig
9 import sys
10
11 def fix_option(name, default):
12     if not arizonaconfig.get_option(name):
13         arizonaconfig.set_option(name, default)
14
15 def init():
16     save_argv = sys.argv
17     sys.argv = sys.argv[:1]
18     arizonaconfig.init_options("arizonaconfig_compat.py", configfile_optvar="configfile", )
19     sys.argv = save_argv
20
21     # XXX are these necessary ?
22     fix_option("keytype", "rsa")
23     fix_option("keygen", "genrsa")
24     fix_option("numbits", "1024")
25     fix_option("xmlsignaturedtd", "arizonacrypt_signature.dtd")
26     fix_option("hashtype", "-sha1")
27     fix_option("packagemanagers", ["rpm", "tar"])