Help restructuring.

Mike Hiretsky 14 years ago
parent b24f2724b4
commit b593dd1772

@ -38,6 +38,7 @@ CMD_OPTIONS = [{'shortOption':"p",
'optVal':"PROFILE", 'optVal':"PROFILE",
'help':_("system profile") 'help':_("system profile")
}, },
{'longOption':"set"},
{'shortOption':"f", {'shortOption':"f",
'longOption':"force", 'longOption':"force",
'help':_("no questions during the creating process") 'help':_("no questions during the creating process")
@ -47,11 +48,15 @@ USAGE = _("%prog [options] iso|squash")
class image_cmd(share_cmd): class image_cmd(share_cmd):
"""Class for work with cl_builder by console""" """Class for work with cl_builder by console"""
def __init__(self): def __init__(self):
setpos = \
filter(lambda x:x[1].get('longOption')=="set",
enumerate(CMD_OPTIONS))[0][0]
CMD_OPTIONS[setpos] = opt.variable_set[0]
self.optobj = opt(package=__app__, self.optobj = opt(package=__app__,
version=__version__, version=__version__,
description=DESCRIPTION, description=DESCRIPTION,
usage=USAGE, usage=USAGE,
option_list= CMD_OPTIONS + opt.variable_control + option_list= CMD_OPTIONS + opt.variable_view +
opt.color_control, opt.color_control,
check_values=self.checkOpts) check_values=self.checkOpts)
self.logicObj = cl_builder() self.logicObj = cl_builder()

@ -28,65 +28,69 @@ from cl_lang import lang
lang().setLanguage(sys.modules[__name__]) lang().setLanguage(sys.modules[__name__])
DESCRIPTION = _("The Calculate Linux kernel builder") DESCRIPTION = _("The Calculate Linux kernel builder")
CMD_OPTIONS = [{'shortOption':"c", CMD_OPTIONS = [{'shortOption':"o",
'longOption':"use-own-config",
'help':_("use config from kernel directory")
},
{'shortOption':"c",
'longOption':"kernel-config", 'longOption':"kernel-config",
'optVal':"FILE", 'optVal':"FILE",
'help':_("kernel configuration file to use for compilation") 'help':_("kernel configuration file to use for compilation")
}, },
{'longOption':"dmraid",
'help':_("include DMRAID support")
},
{'shortOption':"e",
'longOption':"extraversion",
'optVal':"VER",
'help':_("specify extraversion for kernel")
},
{'shortOption':"k", {'shortOption':"k",
'longOption':"kerneldir", 'longOption':"kerneldir",
'optVal':"DIR", 'optVal':"DIR",
'help':_("location of the kernel sources") 'help':_("location of the kernel sources")
}, },
{'shortOption':"m",
'longOption':"menuconfig",
'help':_("run menuconfig after oldconfig")
},
{'longOption':"dmraid",
'help':_("include DMRAID support")
},
{'longOption':"lvm", {'longOption':"lvm",
'help':_("include LVM support") 'help':_("include LVM support")
}, },
{ 'longOption':"mdadm", { 'longOption':"mdadm",
'help':_("copy /etc/mdadm.conf to initramfs") 'help':_("copy /etc/mdadm.conf to initramfs")
}, },
{'shortOption':"m",
'longOption':"menuconfig",
'help':_("run menuconfig after oldconfig")
},
{'longOption':"mrproper", {'longOption':"mrproper",
'help':_("run make mrproper before compilation") 'help':_("run make mrproper before compilation")
}, },
{'longOption':"no-clean", {'longOption':"no-clean",
'help':_("do not run make clean before compilation") 'help':_("do not run make clean before compilation")
}, },
{'shortOption':"o", {'shortOption':"e",
'longOption':"use-own-config", 'longOption':"extraversion",
'help':_("use config from kernel directory") 'optVal':"VER",
}, 'help':_("specify extraversion for kernel")
{'shortOption':"q",
'help':_("do not display kernel compilation process")
}, },
{'longOption':"initrd",
'help':_("perform current initramfs optimization")},
{'longOption':"ebuild", {'longOption':"ebuild",
'help': 'help':
_("build kernel by ebuild phase (need ebuild enviroment)")}, _("build kernel by ebuild phase (need ebuild enviroment)")},
{'longOption':"set"},
{'longOption':"initrd",
'help':_("perform current initramfs optimization")},
{'longOption':"symlink", {'longOption':"symlink",
'help': 'help':
_("set uid symlinks for current kernel in boot directory")} _("set uid symlinks for current kernel in boot directory")},
] {'shortOption':"q",
'help':_("do not display kernel compilation process")
}]
class kernel_cmd(share_cmd): class kernel_cmd(share_cmd):
"""Class for work with cl_install by console""" """Class for work with cl_install by console"""
def __init__(self): def __init__(self):
setpos = \
filter(lambda x:x[1].get('longOption')=="set",
enumerate(CMD_OPTIONS))[0][0]
CMD_OPTIONS[setpos] = opt.variable_set[0]
self.optobj = opt(package=__app__, self.optobj = opt(package=__app__,
version=__version__, version=__version__,
description=DESCRIPTION, description=DESCRIPTION,
option_list= CMD_OPTIONS + opt.variable_control + option_list= CMD_OPTIONS + opt.variable_view +
opt.color_control, opt.color_control,
check_values=self.checkOpts) check_values=self.checkOpts)
self.logicObj = cl_kernel() self.logicObj = cl_kernel()

Loading…
Cancel
Save