Changeset f951077 in mainline
- Timestamp:
- 2006-06-07T17:46:32Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b2951e2
- Parents:
- ce5bcb4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/config.py
rce5bcb4 rf951077 1 1 #!/usr/bin/env python 2 2 """ 3 user spaceconfiguration script3 Kernel configuration script 4 4 """ 5 5 import sys … … 8 8 import commands 9 9 10 INPUT = ' uspace.config'10 INPUT = 'kernel.config' 11 11 OUTPUT = 'Makefile.config' 12 12 TMPOUTPUT = 'Makefile.config.tmp' … … 109 109 110 110 111 def eof_checker(fnc): 112 def wrapper(self, *args, **kw): 113 try: 114 return fnc(self, *args, **kw) 115 except EOFError: 116 return getattr(self.bckdialog,fnc.func_name)(*args, **kw) 117 return wrapper 118 111 119 class Dialog(NoDialog): 112 120 def __init__(self): … … 114 122 self.dlgcmd = os.environ.get('DIALOG','dialog') 115 123 self.title = '' 116 self.backtitle = 'HelenOS User SpaceConfiguration'124 self.backtitle = 'HelenOS Kernel Configuration' 117 125 118 126 if os.system('%s --print-maxsize >/dev/null 2>&1' % self.dlgcmd) != 0: 119 127 raise NotImplementedError 128 129 self.bckdialog = NoDialog() 120 130 121 131 def set_title(self,text): 122 132 self.title = text 133 self.bckdialog.set_title(text) 123 134 124 135 def calldlg(self,*args,**kw): … … 177 188 return 'y' 178 189 return 'n' 190 yesno = eof_checker(yesno) 179 191 180 192 def menu(self, text, choices, button, defopt=None): … … 204 216 raise EOFError 205 217 return data 218 menu = eof_checker(menu) 206 219 207 220 def choice(self, text, choices, defopt=None): … … 223 236 raise EOFError 224 237 return data 238 choice = eof_checker(choice) 225 239 226 240 def read_defaults(fname,defaults): … … 474 488 os.rename(TMPOUTPUT, OUTPUT) 475 489 476 if not defmode and dlg.yesno('Rebuild user space?') == 'y':490 if not defmode and dlg.yesno('Rebuild kernel?') == 'y': 477 491 os.execlp('make','make','clean','build') 478 492
Note:
See TracChangeset
for help on using the changeset viewer.