1 # vi: encoding=utf-8 ts=8 sts=4 sw=4 et
7 if os.environ.has_key('HOME'):
8 path = os.environ['HOME']
10 path = '../../' # cgi-bin interface
12 f = open(path + '/.ftpadmrc', 'r')
14 for line in f.readlines():
15 if line[0] == '#' or string.find(line, '=') == -1:
17 tuple = string.split(string.strip(line), '=')
18 if tuple[1][0] == '"':
19 value[string.strip(tuple[0])] = tuple[1][1:-1]
21 value[string.strip(tuple[0])] = string.strip(tuple[1])
25 default_to = value['ftp_dir'] + '/' + value['default_to'] + '/'
26 ftp_dir = value['ftp_dir'] + '/'
27 incoming_dir = value['ftp_dir'] + '/' + value['incoming_dir'] + '/'
28 test_builds_dir = value['ftp_dir'] + '/' + value['test_builds_dir'] + '/'
29 ftp_archs = value['ftp_archs'].split(' ')
31 builderqueue = value['builderqueue']
33 if 'old_poldek' in value and value['old_poldek'] == 'yes':
38 if 'poldek_indexes' in value:
39 poldek_indexes = value['poldek_indexes']
41 poldek_indexes = 'old'
43 if value['separate_noarch'] == 'yes':
44 separate_noarch = True
46 separate_noarch = False
49 all_ftp_archs = ['noarch'] + ftp_archs
51 all_ftp_archs = ftp_archs