Добавлена переменная предпочтения файловых систем, предпочитаемой файловой системой назначена Btrfs

legacy27 3.6.9.9
parent 5f9cd36e2d
commit d3440bc46d

@ -176,21 +176,15 @@ class FileSystemManager(object):
else:
return ""
defaultFS = {
'hdd': ("ext4"
if path.exists(supportFS['ext4']['format']) else
"btrfs"
if path.exists(supportFS['btrfs']['format']) else
"reiserfs"
if path.exists(supportFS['reiserfs']['format']) else
"ext3"),
'flash': "vfat",
'usb-hdd': ("ext4"
if path.exists(supportFS['ext4']['format']) else
"reiserfs"
if path.exists(supportFS['reiserfs']['format']) else
"ext3")
}
@classmethod
def get_default_fs(cls, dv, installtype):
if installtype == 'flash':
return 'vfat'
filesystems = dv.Get('install.cl_install_fs')
for fs in filesystems:
if fs in cls.supportFS and path.exists(cls.supportFS[fs]['format']):
return fs
return 'ext3'
@classmethod
def getDefaultOpt(cls, fs, ssd=False, compress=None):

@ -441,7 +441,7 @@ class VariableClAutopartitionDefaultFormat(Variable):
type = "choice"
def get(self):
return FileSystemManager.defaultFS['hdd']
return FileSystemManager.get_default_fs(self, 'hdd')
def choice(self):
allfs = set([k for k,v in FileSystemManager.supportFS.items()

@ -1375,8 +1375,7 @@ class VariableOsLocationFormat(LocationHelper, Variable):
return diskFormat[dev]
if default_format:
return default_format
return FileSystemManager.defaultFS.get(
osInstallRootType, "ext4")
return FileSystemManager.get_default_fs(self, osInstallRootType)
return fs
return wrap

@ -991,6 +991,13 @@ class VariableOsInstallSplashSet(Variable):
type = "bool"
value = "on"
class VariableClInstallFs(Variable):
"""
Preferred fs
"""
type = "list"
value = ["btrfs", "ext4", "reiserfs", "ext3"]
class FlashUncompatible(VariableInterface):
def uncompatible(self):

Loading…
Cancel
Save