From 9ba8b614939abdeb93c0eadb41b28291e638aa78 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Mon, 29 Nov 2010 18:11:33 +0300 Subject: [PATCH] Add template applying for installation on flash. --- i18n/cl_install_ru.mo | Bin 22378 -> 22492 bytes pym/cl_fill_install.py | 14 ++++++++++++++ pym/cl_install.py | 19 +++++++++++++++++++ pym/cl_vars_install.py | 3 +++ 4 files changed, 36 insertions(+) diff --git a/i18n/cl_install_ru.mo b/i18n/cl_install_ru.mo index 5dfd87ee3c25ed8f67e85bc05d385752720496ce..76efcb502cae3078d9e6d94aff513b23d4b36df4 100644 GIT binary patch delta 4645 zcmZwKd-#^)0SE9qg^H5S6u+NH2T2k?${`|5PB|n?q(qilWR%0}JQkywR5uQtbWkKa*%=fRcnIAG!-d1m#xDIo?4F~ZD%yUj) ze_qLSXcY%FWgg9HxsiGB5@tqTXO`q+=KfaAjr*GDRN0(u^8W9ul93$9F+7qRa}o8W zyum#98|J~?&3_skz&v0o@?w>+$ zc$wAD{HFu+oM`4P%m|iqGrr3-)TMu;=iQk#9>|RB2gO&JmhfBWX`|95&Vu9ak!h$;WKRFSiRVvwPRJX+n-`?_?E-i;$$8)oxAgLj^;bm zw=%#*2lF7NWB1Z(mG_w??XaacgaeqhK8kru&fo@IOnanO-c;GmiEfTEl8H2^@+hb9 z6L#eRrXfplG;@3#wN)Nr4}Q+f*qWvZA|1JuN+IVNT4Z&X${K zzm$*JhMSuIybVLS3eRJf?tEUs=a>;s+o#ci`P|R(W89bBeW;eBn3;HxL-PK=)u@zC zV;f)W$gI_o9KbWVAs2FEKF=)8*UV;JS1Y-0HnWMZ;cEPf9r;~#+`&7XhPyILI-E^; z|4&sJ=fpJ}$}j0RrwlltvDprzSGJtWOyxry$?usZ8EIO~W;v0WnI}1zPxC~6&Ag_w zG_ncrVk_!b#^0FUtZ}BtWRyE3Wp(Kx*XBTJD|gG!t-%Iw%)Ep>jzuvo3IZ1vjXGo@aiZsbFk}|tNIi49wO8*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zRUT8BS99AapQn65b^dg|oo`N5m?6{U8Ob(YZj=M$9_cIDUY4t6iAl(RU-j!?%M_3eQ!k8a?E62CJJ$~Y diff --git a/pym/cl_fill_install.py b/pym/cl_fill_install.py index b6dacb7..9667597 100644 --- a/pym/cl_fill_install.py +++ b/pym/cl_fill_install.py @@ -68,17 +68,31 @@ class fillVars(object, glob_attr): actionsMap = {'merge':'up', 'system':'up'} cl_action = self.Get('cl_action') + clRootType = self.Get('os_install_root_type') + if cl_action == "system" and clRootType == "flash": + return "" return actionsMap[cl_action] if cl_action in actionsMap else "" def get_cl_install_system_action(self): """Need perform templates for install:system""" if self.Get('cl_assemble_prepare_action') != "": return "" + if self.Get('os_install_root_type') == "flash": + return "" if self.Get('cl_action') == 'system': return "up" else: return "" + def get_cl_install_flash_action(self): + """Need perform templates for install:flash""" + actionsMap = {'system':'up'} + clAction = self.Get('cl_action') + clRootType = self.Get('os_install_root_type') + if clAction == 'system' and clRootType == 'flash': + return "up" + return "" + def get_cl_install_scratch_action(self): """Need perform templates for install:system""" if self.Get('cl_assemble_prepare_action') != "": diff --git a/pym/cl_install.py b/pym/cl_install.py index 3c5516a..66416f4 100644 --- a/pym/cl_install.py +++ b/pym/cl_install.py @@ -947,6 +947,18 @@ class cl_install(color_print, SignalInterrupt): self.clTempl.closeFiles() self.clTempl = None + def applyTemplatesFlash(self,directory): + """Apply templates for root of system.""" + #self.clVars.Set("cl_root_path",directory, True) + self.clVars.Set("cl_chroot_path","/", True) + self.clVars.Set("cl_root_path",directory, True) + self.clTempl = template(self.clVars,cltObj=False) + dirsFiles = self.clTempl.applyTemplates() + if self.clTempl.getError(): + raise InstallError(self.clTempl.getError()) + else: + return dirsFiles + def applyTemplates(self,directory): """Apply templates for root of system.""" #self.clVars.Set("cl_root_path",directory, True) @@ -1846,6 +1858,13 @@ the system") + " (yes/no)" if self.clVars.Get('os_install_root_type') != "flash": self.afterCopyHDDinstall(targetDistr, addUsers, changePwdUsers, migrateUsers) + else: + # join templates + self.printMessageForTest( + _("Configure of flash installation")) + self.applyTemplatesFlash(targetDistr.getDirectory()) + self.printByResult(True) + self.closeClTemplate() # change boot config if self.clVars.Get('os_install_mbr'): self.printMessageForTest(_("Preparing system for reboot")) diff --git a/pym/cl_vars_install.py b/pym/cl_vars_install.py index 4ef4b63..fd82a62 100644 --- a/pym/cl_vars_install.py +++ b/pym/cl_vars_install.py @@ -43,6 +43,9 @@ class Data: # need perform templates for install:scratch cl_install_scratch_action = {} + # need perform templates for install:flash + cl_install_flash_action = {} + # TODO: depricated os_install_scratch_action = {'hide':True}