Add python and lib variables

develop 3.6.6.1
parent 415845d370
commit 79a4b7fb0b

@ -32,6 +32,7 @@ from calculate.lib.utils.portage import isPkgInstalled
import calculate.lib.utils.device as device
from calculate.lib.encrypt import sha256_crypt
from calculate.lib.variables.system import RootType
import calculate.lib.variables.env as libenv
from calculate.lib.encrypt import get_shadow_hash, get_grub_hash
from calculate.core.server.admin import Admins
import calculate.lib.cl_ini_parser as cl_ini_parser
@ -74,6 +75,28 @@ class GrubHelper(VariableInterface):
return ""
class VariableOsInstallLibPath(ReadonlyVariable):
"""
Использовать lib или lib64
"""
def get(self):
if self.Get('os_install_arch_machine') == 'x86_64':
return "lib64"
else:
return "lib"
class VariableOsInstallPython(libenv.VariableOsPython):
"""
Текущий python
"""
def get_root(self):
return self.Get('cl_chroot_path')
def get_usrlib(self):
return "/usr/%s" % self.Get('os_install_lib_path')
class VariableOsInstallScratch(ReadonlyVariable):
"""
Install system in scratch mode

Loading…
Cancel
Save