|
|
|
@ -25,6 +25,7 @@ from calculate.lib.datavars import (Variable, VariableError, ReadonlyVariable,
|
|
|
|
|
from calculate.lib.utils.common import (getSupportArch, getTupleVersion,
|
|
|
|
|
cmpVersion, cmp)
|
|
|
|
|
from calculate.lib.utils.files import listDirectory, pathJoin
|
|
|
|
|
from calculate.lib.utils.grub import GrubCommand
|
|
|
|
|
from calculate.lib.variables.linux import Linux
|
|
|
|
|
from ..distr import (Distributive, PartitionDistributive,
|
|
|
|
|
DirectoryDistributive, DefaultMountPath,
|
|
|
|
@ -522,6 +523,7 @@ class VariableClTarget(ReadonlyVariable):
|
|
|
|
|
Target distributive
|
|
|
|
|
"""
|
|
|
|
|
type = "object"
|
|
|
|
|
filesystem = "cl_target_fs"
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
listVars = ['os_install_disk_dev', 'os_install_disk_mount',
|
|
|
|
@ -535,9 +537,10 @@ class VariableClTarget(ReadonlyVariable):
|
|
|
|
|
flashLabel = "{short}-{build}".format(
|
|
|
|
|
short="CL", build=self.Get('os_install_linux_build'))
|
|
|
|
|
disk = self.Get('os_install_disk_single')
|
|
|
|
|
fileSystem = "vfat"
|
|
|
|
|
fileSystem = self.Get(self.filesystem) or 'ntfs'
|
|
|
|
|
#fileSystem = "vfat"
|
|
|
|
|
systemId = FileSystemManager.supportFS.get(
|
|
|
|
|
'vfat', {}).get('msdos', '0b')
|
|
|
|
|
fileSystem, {}).get('msdos', '0b')
|
|
|
|
|
isFormat = self.GetBool('os_install_format_single_set')
|
|
|
|
|
partTable = self.select('os_disk_part',
|
|
|
|
|
os_disk_dev=disk, limit=1)
|
|
|
|
@ -598,6 +601,26 @@ class VariableClTarget(ReadonlyVariable):
|
|
|
|
|
return target
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClTargetFs(Variable):
|
|
|
|
|
type = 'choice'
|
|
|
|
|
opt = ['--fs']
|
|
|
|
|
disk = 'os_install_disk_single'
|
|
|
|
|
value = 'auto'
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.label = _("File system on flash device")
|
|
|
|
|
self.help = _("Create new FS on flash device(formating req)")
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
if self.value != 'auto':
|
|
|
|
|
return self.value
|
|
|
|
|
return 'ntfs'
|
|
|
|
|
|
|
|
|
|
def choice(self):
|
|
|
|
|
return ['vfat', 'btrfs', 'ntfs', 'ext4',
|
|
|
|
|
'ext3', 'ext2', 'xfs']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClImageNewOnly(Variable):
|
|
|
|
|
"""
|
|
|
|
|
Distributive image filename
|
|
|
|
|