diff --git a/install/cl_install.py b/install/cl_install.py index 26c3f48..cc73ddc 100644 --- a/install/cl_install.py +++ b/install/cl_install.py @@ -683,7 +683,7 @@ class Install(color_print): sourceDistr = None try: #self.clVars.printVars() - if self.clVars.Get('cl_autopartition_set') == 'auto': + if self.clVars.Get('cl_autopartition_set') == 'on': self.startTask(_("Creating new partition table"), progress=True) ap = AutoPartition() diff --git a/install/variables/autopartition.py b/install/variables/autopartition.py index bcba628..f02d74d 100644 --- a/install/variables/autopartition.py +++ b/install/variables/autopartition.py @@ -314,7 +314,7 @@ class AutopartitionHelper: return sorted(self.Get('cl_autopartition_scheme'),key=optOrder.get) def uncompatible(self): - if self.Get('cl_autopartition_set') == "manual": + if self.Get('cl_autopartition_set') == "off": return \ _("Autopartition parameters are not available " "with manual partitioning") @@ -411,7 +411,7 @@ class VariableClAutopartitionDevice(AutopartitionHelper,Variable): self.checkNeeded(valuelist,raidDevices,"RAID") def check(self,valuelist): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": if not valuelist: raise VariableError(_("For autopartition need select install" " device")) @@ -441,16 +441,18 @@ class VariableClAutopartitionSet(Variable): """ Using autopartition """ - type = "choiceedit" - value = "manual" + type = "bool" + value = "off" element = "radio" + opt = ["--autopartition"] def init(self): self.label = _("Partitions") + self.help = _("use autoparitition") def choice(self): - return [("manual",_("Manual partition")), - ("auto",_("Autopartition"))] + return [("off",_("Manual partition")), + ("on",_("Autopartition"))] class VariableClAutopartitionScheme(AutopartitionHelper,Variable,AutoPartition): """ @@ -459,7 +461,7 @@ class VariableClAutopartitionScheme(AutopartitionHelper,Variable,AutoPartition): type = "choice-list" value = ["swap","root","data"] element = "selecttable" - opt = ["--autopart"] + opt = ["--auto-scheme"] metavalue = "AUTOPARTOPTS" def init(self): @@ -520,7 +522,7 @@ class VariableClAutopartitionRootSize(AutopartitionHelper,Variable): def check(self,value): if self.Get('cl_autopartition_device') and \ - self.Get('cl_autopartition_set') == "auto": + self.Get('cl_autopartition_set') == "on": if int(value) < Sizes().to_M(MINROOTSIZE): raise VariableError( _("Root partition size should not be less {size}").format( @@ -612,7 +614,7 @@ class VariableClAutopartitionDiskDev(ReadonlyVariable,AutopartitionHelper): return self.generateDisks def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": scheme = self.getAutopartitionScheme() devices = self.Get('cl_autopartition_device') if devices: @@ -637,7 +639,7 @@ class VariableClAutopartitionDiskMount(ReadonlyVariable,AutopartitionHelper): yield self.mpByOpts(line) def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": scheme = self.getAutopartitionScheme() device = self.Get('cl_autopartition_device') if device: @@ -659,7 +661,7 @@ class VariableClAutopartitionDiskFormat(ReadonlyVariable,AutopartitionHelper): else: yield FileSystemManager.defaultFS['hdd'] def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": scheme = self.getAutopartitionScheme() device = self.Get('cl_autopartition_device') if device: @@ -686,7 +688,7 @@ class VariableClAutopartitionDiskPart(ReadonlyVariable,AutopartitionHelper): yield "gpt" def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": scheme = self.getAutopartitionScheme() table = self.Get('cl_autopartition_table') if scheme: @@ -701,7 +703,7 @@ class VariableClAutopartitionDiskType(ReadonlyVariable,AutopartitionHelper): type = "list" def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": if self.Get('cl_autopartition_lvm_set')=="on": diskType = "LVM" else: @@ -733,7 +735,7 @@ class VariableClAutopartitionDiskSize(ReadonlyVariable,AutopartitionHelper): yield "allfree" def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": scheme = self.getAutopartitionScheme() device = self.Get('cl_autopartition_device') availSize = self.Get('cl_autopartition_device_size') @@ -802,7 +804,7 @@ class VariableClAutopartitionBindPath(ReadonlyVariable,AutopartitionHelper): yield self.sourceMpByOpts(line) def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": scheme = self.getAutopartitionScheme() device = self.Get('cl_autopartition_device') return list(self.generatePath(scheme)) @@ -820,7 +822,7 @@ class VariableClAutopartitionBindMountpoint(ReadonlyVariable, yield self.targetMpByOpts(line) def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": scheme = self.getAutopartitionScheme() device = self.Get('cl_autopartition_device') return list(self.generateMountPoint(scheme)) diff --git a/install/variables/disk.py b/install/variables/disk.py index 2db94fc..b0da8e0 100644 --- a/install/variables/disk.py +++ b/install/variables/disk.py @@ -214,7 +214,7 @@ class VariableOsDeviceTable(ReadonlyVariable): def get(self): """Get device partition table""" - autopartition = self.Get('cl_autopartition_set') == 'auto' + autopartition = self.Get('cl_autopartition_set') == 'on' autoDevice = self.Get('cl_autopartition_device') def getTable(device): prop = getUdevDeviceInfo(name=device) @@ -589,7 +589,7 @@ class LocationHelper: """ Network setting up unavailable for flash installation """ - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": return \ _("Location not available with autopartitioning") return "" @@ -646,7 +646,7 @@ class VariableOsLocationSource(LocationHelper,DeviceHelper,Variable): self.Get('os_bind_path') def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": return self.Get('cl_autopartition_disk_dev') + \ self.Get('cl_autopartition_bind_path') else: @@ -663,7 +663,7 @@ class VariableOsLocationSource(LocationHelper,DeviceHelper,Variable): """ if not sourcelist: sourcelist = self.Get('os_disk_dev') - scheme = self.Get('cl_autopartition_set') == "auto" + scheme = self.Get('cl_autopartition_set') == "on" if scheme: excludeDisks = self.Select('os_disk_dev', where='os_disk_parent', @@ -712,7 +712,7 @@ class VariableOsLocationDest(LocationHelper,Variable): self.label = _("Mount point") def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": return self.Get('cl_autopartition_disk_mount') + \ self.Get('cl_autopartition_bind_mountpoint') else: @@ -876,7 +876,7 @@ class VariableOsLocationFormat(LocationHelper,Variable): self.label = _("File system") def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": return self.Get('cl_autopartition_disk_format') + \ map(lambda x:"",self.Get('cl_autopartition_bind_path')) else: @@ -950,7 +950,7 @@ class VariableOsLocationPerformFormat(LocationHelper,Variable): self.label = _("Format") def get(self): - if self.Get('cl_autopartition_set') == "auto": + if self.Get('cl_autopartition_set') == "on": return map(lambda x:"on", self.Get('cl_autopartition_disk_format')) + \ map(lambda x:"", @@ -1280,7 +1280,7 @@ class VariableOsInstallDiskParent(SourceReadonlyVariable): def getMap(self): diskParent = dict(self.ZipVars('os_disk_dev','os_disk_parent')) # replace value for autopartition - if self.Get('cl_autopartition_set') == 'auto': + if self.Get('cl_autopartition_set') == 'on': diskParent.update(zip(self.Get('cl_autopartition_disk_dev'), self.Get('cl_autopartition_device')* len(self.Get('cl_autopartition_disk_dev')))) @@ -1346,7 +1346,7 @@ class VariableOsInstallMbr(LocationHelper,Variable): def get(self): """Get default Master boot record install""" - if self.Get('cl_autopartition_set') == 'auto' and \ + if self.Get('cl_autopartition_set') == 'on' and \ self.Get('cl_autopartition_lvm_set') == 'on': return self.Get('cl_autopartition_device') if self.Get('os_install_root_type') in ("flash","usb-hdd"): @@ -1419,7 +1419,7 @@ class VariableOsInstallMbr(LocationHelper,Variable): raise VariableError( _("For flash installation need only one disk")) for mbrDisk in value: - if self.Get('cl_autopartition_set') == 'auto': + if self.Get('cl_autopartition_set') == 'on': tableOnBootDisk = self.Get('cl_autopartition_table') else: tableOnBootDisk = self.Select('os_device_table', @@ -1488,7 +1488,7 @@ class VariableOsInstallRootType(LocationHelper,Variable): self.label = _("Installation type") def get(self): - if self.Get('cl_autopartition_set') == 'auto': + if self.Get('cl_autopartition_set') == 'on': return "hdd" rootdev = self.Get('os_install_root_dev') devicetype = getPartitionDevice( diff --git a/install/variables/distr.py b/install/variables/distr.py index 4943bd7..2dea447 100644 --- a/install/variables/distr.py +++ b/install/variables/distr.py @@ -262,12 +262,14 @@ class VariableClImageFilename(Variable,DistroRepository): """ type = 'file' element = 'file' + metaval = "IMAGE" opt = ['--iso'] untrusted = True def init(self): self.label = _("Installation image") self.help = _("ISO image for installation") + # TODO: ???? self.wrong = True def get(self): @@ -325,6 +327,7 @@ class VariableClImageArchMachine(Variable,DistroRepository): value = "" type = 'choice' opt = ['--march'] + metaval = "ARCH" available_arch = ["i686","x86_64"] def init(self): @@ -350,6 +353,7 @@ class VariableClImageLinuxShortname(Variable,Linux,DistroRepository): """ value = "" type = 'choice' + metaval = "SYSTEM" opt = ['--os','-s'] def init(self): diff --git a/install/variables/locale.py b/install/variables/locale.py index 7960241..ca5629e 100644 --- a/install/variables/locale.py +++ b/install/variables/locale.py @@ -116,6 +116,7 @@ class VariableOsInstallLocaleLang(LocaleVariable): Full language (at example: ru_RU) """ mode = 'w' + metaval = "LANG" type = 'choice' opt = ["--lang","-l"] diff --git a/install/variables/net.py b/install/variables/net.py index 5b32b60..ce0c6c7 100644 --- a/install/variables/net.py +++ b/install/variables/net.py @@ -108,7 +108,7 @@ class VariableOsInstallNetData(NetHelper,TableVariable): Hash for information about net """ opt = ["--ip"] - metavalue = "IFACE:IP:MASK" + metavalue = "IFACE_SETTINGS" source = ["os_install_net_interfaces", "os_install_net_dhcp_set", "os_install_net_ip", @@ -132,6 +132,7 @@ class VariableOsInstallNetFqdn(NetHelper,Variable): Full host name """ opt = ['--hostname'] + metaval = "HOSTNAME" def init(self): self.label = _("Hostname") @@ -325,7 +326,7 @@ class VariableOsInstallNetRouteData(NetHelper,TableVariable): Route table data """ opt = ["--route"] - metavalue = "NETWORK:[GATEWAY][:DEV[:SOURCE]]" + metavalue = "NETROUTE" source = ['os_install_net_route_network', 'os_install_net_route_gw', 'os_install_net_route_dev', @@ -334,7 +335,8 @@ class VariableOsInstallNetRouteData(NetHelper,TableVariable): def init(self): self.label = _("Routing") - self.help = _("add a routing rule") + self.help = \ + _("add a routing rule (format NETWORK:[GATEWAY][:DEV[:SOURCE]])") def get(self,hr=False): """Routing hash"""