Rev 3916 | Rev 4054 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3916 | Rev 3937 | ||
---|---|---|---|
Line 101... | Line 101... | ||
101 | 101 | ||
102 | if (not defaults.has_key(condname)): |
102 | if (not defaults.has_key(condname)): |
103 | varval = '' |
103 | varval = '' |
104 | else: |
104 | else: |
105 | varval = defaults[condname] |
105 | varval = defaults[condname] |
- | 106 | if (varval == '*'): |
|
- | 107 | varval = 'y' |
|
106 | 108 | ||
107 | if (ctype == 'cnf'): |
109 | if (ctype == 'cnf'): |
108 | if (oper == '=') and (condval == varval): |
110 | if (oper == '=') and (condval == varval): |
109 | return True |
111 | return True |
110 | 112 | ||
Line 247... | Line 249... | ||
247 | 249 | ||
248 | if (not defaults.has_key(varname)): |
250 | if (not defaults.has_key(varname)): |
249 | default = '' |
251 | default = '' |
250 | else: |
252 | else: |
251 | default = defaults[varname] |
253 | default = defaults[varname] |
- | 254 | if (default == '*'): |
|
- | 255 | default = 'y' |
|
252 | 256 | ||
253 | outmk.write('# %s\n%s = %s\n\n' % (name, varname, default)) |
257 | outmk.write('# %s\n%s = %s\n\n' % (name, varname, default)) |
254 | 258 | ||
255 | if ((vartype == "y") or (vartype == "y/n") or (vartype == "n/y")): |
259 | if ((vartype == "y") or (vartype == "y/n") or (vartype == "n/y")): |
256 | if (default == "y"): |
260 | if (default == "y"): |
Line 300... | Line 304... | ||
300 | selname = None |
304 | selname = None |
301 | while True: |
305 | while True: |
302 | 306 | ||
303 | # Cancel out all defaults which have to be deduced |
307 | # Cancel out all defaults which have to be deduced |
304 | for varname, vartype, name, choices, cond in ask_names: |
308 | for varname, vartype, name, choices, cond in ask_names: |
305 | if (vartype == 'y'): |
309 | if ((vartype == 'y') and (defaults.has_key(varname)) and (defaults[varname] == '*')): |
306 | defaults[varname] = None |
310 | defaults[varname] = None |
307 | 311 | ||
308 | options = [] |
312 | options = [] |
309 | opt2row = {} |
313 | opt2row = {} |
310 | position = None |
314 | position = None |
Line 333... | Line 337... | ||
333 | defaults[varname] = choices[0][0] |
337 | defaults[varname] = choices[0][0] |
334 | continue |
338 | continue |
335 | 339 | ||
336 | options.append(" %s [%s] --> " % (name, default)) |
340 | options.append(" %s [%s] --> " % (name, default)) |
337 | elif (vartype == 'y'): |
341 | elif (vartype == 'y'): |
338 | defaults[varname] = 'y' |
342 | defaults[varname] = '*' |
339 | continue |
343 | continue |
340 | elif (vartype == 'y/n'): |
344 | elif (vartype == 'y/n'): |
341 | if (default == None): |
345 | if (default == None): |
342 | default = 'y' |
346 | default = 'y' |
343 | defaults[varname] = default |
347 | defaults[varname] = default |