Changeset 4756634 in mainline for tools/config.py
- Timestamp:
- 2010-12-03T22:10:49Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ba8de9c3
- Parents:
- 62bb73e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/config.py
r62bb73e r4756634 232 232 233 233 if (not varname in config): 234 default= None234 value = None 235 235 else: 236 default = config[varname] 237 238 if not rule_value_is_valid((varname, vartype, name, choices, cond), default): 239 default = None 240 241 rdef = rule_get_default((varname, vartype, name, choices, cond)) 242 if rdef != None: 243 default = rdef 244 config[varname] = rdef 236 value = config[varname] 237 238 if not rule_value_is_valid((varname, vartype, name, choices, cond), value): 239 value = None 240 241 default = rule_get_default((varname, vartype, name, choices, cond)) 242 if default != None: 243 config[varname] = default 245 244 246 245 if (not varname in config): … … 377 376 378 377 if (not varname in config): 379 default= ''378 value = '' 380 379 else: 381 default= config[varname]382 if ( default== '*'):383 default= 'y'384 385 outmk.write('# %s\n%s = %s\n\n' % (name, varname, default))380 value = config[varname] 381 if (value == '*'): 382 value = 'y' 383 384 outmk.write('# %s\n%s = %s\n\n' % (name, varname, value)) 386 385 387 386 if ((vartype == "y") or (vartype == "n") or (vartype == "y/n") or (vartype == "n/y")): 388 if ( default== "y"):387 if (value == "y"): 389 388 outmc.write('/* %s */\n#define %s\n\n' % (name, varname)) 390 389 defs += ' -D%s' % varname 391 390 else: 392 outmc.write('/* %s */\n#define %s %s\n#define %s_%s\n\n' % (name, varname, default, varname, default))393 defs += ' -D%s=%s -D%s_%s' % (varname, default, varname, default)391 outmc.write('/* %s */\n#define %s %s\n#define %s_%s\n\n' % (name, varname, value, varname, value)) 392 defs += ' -D%s=%s -D%s_%s' % (varname, value, varname, value) 394 393 395 394 if (revision is not None): … … 502 501 503 502 if (not varname in config): 504 default= None503 value = None 505 504 else: 506 default= config[varname]507 508 if not rule_value_is_valid(rule, default):509 default= None510 511 rdef= rule_get_default(rule)512 if rdef!= None:513 default = rdef514 config[varname] = rdef515 516 option = rule_get_option(rule, default)505 value = config[varname] 506 507 if not rule_value_is_valid(rule, value): 508 value = None 509 510 default = rule_get_default(rule) 511 if default != None: 512 value = default 513 config[varname] = default 514 515 option = rule_get_option(rule, value) 517 516 if option != None: 518 517 options.append(option) … … 549 548 550 549 if (not selname in config): 551 default= None550 value = None 552 551 else: 553 default= config[selname]552 value = config[selname] 554 553 555 554 if (seltype == 'choice'): 556 config[selname] = subchoice(screen, name, choices, default)555 config[selname] = subchoice(screen, name, choices, value) 557 556 elif ((seltype == 'y/n') or (seltype == 'n/y')): 558 557 if (config[selname] == 'y'):
Note:
See TracChangeset
for help on using the changeset viewer.