|
|
|
@ -654,8 +654,8 @@ class convertDictOpt:
|
|
|
|
|
and self._getDeviceType(dev) == "flash":
|
|
|
|
|
mp = "flash"
|
|
|
|
|
raise InstallError(
|
|
|
|
|
_("File system for '%s' should not be '%s'")
|
|
|
|
|
%(mp, optFileSystem))
|
|
|
|
|
_("File system for '%(mp)s' should not be '%(opt)s'")
|
|
|
|
|
%{'mp':mp, 'opt':optFileSystem})
|
|
|
|
|
if not "fileSystem" in dictOptions or optFileSystem == "default":
|
|
|
|
|
dictOptions.update(
|
|
|
|
|
self.getDefaultOptFileSystem(optFileSystem,
|
|
|
|
@ -670,8 +670,8 @@ class convertDictOpt:
|
|
|
|
|
and self._getDeviceType(dev) == "flash":
|
|
|
|
|
mp = "flash"
|
|
|
|
|
raise InstallError(\
|
|
|
|
|
_("File system for '%s' should not be '%s'")
|
|
|
|
|
%(mp, format))
|
|
|
|
|
_("File system for '%(mp)s' should not be '%(format)s'")\
|
|
|
|
|
%{'mp':mp,'format':format})
|
|
|
|
|
if not options:
|
|
|
|
|
options = ["noatime"]
|
|
|
|
|
dictOptions["fileSystem"] = format
|
|
|
|
@ -732,8 +732,8 @@ class cltCopy(scanDirectory):
|
|
|
|
|
os.makedirs(targetDir)
|
|
|
|
|
copy2(pathname,pathJoin(self.target,pathname))
|
|
|
|
|
except Exception,e:
|
|
|
|
|
raise InstallError(_("Can not copy '%s' to '%s'")%
|
|
|
|
|
(pathname,pathJoin(self.target,pathname)))
|
|
|
|
|
raise InstallError(_("Can not copy '%(src)s' to '%(dst)s'")%
|
|
|
|
|
{'src':pathname,'dst':pathJoin(self.target,pathname)})
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
class otherfilesCopy(scanDirectory):
|
|
|
|
@ -758,8 +758,8 @@ class otherfilesCopy(scanDirectory):
|
|
|
|
|
os.makedirs(targetDir)
|
|
|
|
|
copy2(pathname,pathJoin(self.target,pathname))
|
|
|
|
|
except Exception,e:
|
|
|
|
|
raise InstallError(_("Can not copy '%s' to '%s'")%
|
|
|
|
|
(pathname,pathJoin(self.target,pathname)))
|
|
|
|
|
raise InstallError(_("Can not copy '%(src)s' to '%(dst)s'")%
|
|
|
|
|
{'src':pathname,'dst':pathJoin(self.target,pathname)})
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1030,9 +1030,11 @@ class cl_install(color_print, SignalInterrupt):
|
|
|
|
|
if wrongBind:
|
|
|
|
|
incompBind = filter(lambda x:x[1]==wrongBind[0],
|
|
|
|
|
zip(srcMountPoints,destMountPoints))
|
|
|
|
|
self.printERROR(
|
|
|
|
|
_("Source directory %s already use for bind '%s' to '%s'")%
|
|
|
|
|
(wrongBind[0],incompBind[0][0],incompBind[0][1]))
|
|
|
|
|
self.printERROR(_("Source directory %(src)s already use "\
|
|
|
|
|
"for bind '%(bindSrc)s' to '%(bindDst)s'")\
|
|
|
|
|
%{'src':wrongBind[0],
|
|
|
|
|
'bindSrc':incompBind[0][0],
|
|
|
|
|
'bindDst':incompBind[0][1]})
|
|
|
|
|
return False
|
|
|
|
|
# Check bind params
|
|
|
|
|
wrongBind = filter(lambda x:not x[0].startswith("/") or
|
|
|
|
@ -1040,8 +1042,10 @@ class cl_install(color_print, SignalInterrupt):
|
|
|
|
|
x[1] != "none",
|
|
|
|
|
zip(srcMountPoints,destMountPoints))
|
|
|
|
|
if wrongBind:
|
|
|
|
|
self.printERROR(_("Incorrect mount point (bind '%s' to '%s')")%
|
|
|
|
|
(wrongBind[0][0],wrongBind[0][1]))
|
|
|
|
|
self.printERROR(_("Incorrect mount point (bind '%(bindSrc)s' to "\
|
|
|
|
|
"'%(bindDst)s')")\
|
|
|
|
|
%{'bindSrc':wrongBind[0][0],
|
|
|
|
|
'bindDst':wrongBind[0][1]})
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
# Check '/' in start path
|
|
|
|
@ -1931,9 +1935,9 @@ the system") + " (yes/no)"
|
|
|
|
|
self.printMessageForTest(
|
|
|
|
|
_("Link calculate-install to package configuration"))
|
|
|
|
|
self.printByResult(appendProgramToEnvFile(__app__, self.clVars),
|
|
|
|
|
failMessage=
|
|
|
|
|
_("Can not save '%s' to %s")%(__app__,
|
|
|
|
|
self.clVars.Get("cl_env_path")[0]))
|
|
|
|
|
failMessage= _("Can not save '%(app)s' to %(path)s")
|
|
|
|
|
%{'app':__app__,
|
|
|
|
|
'path':self.clVars.Get("cl_env_path")[0]})
|
|
|
|
|
except (InstallError,DistributiveError),e:
|
|
|
|
|
error = e
|
|
|
|
|
except (Exception),e:
|
|
|
|
@ -1963,9 +1967,9 @@ the system") + " (yes/no)"
|
|
|
|
|
self.printMessageForTest(
|
|
|
|
|
_("Unlink calculate-install from package configuration"))
|
|
|
|
|
self.printByResult(removeProgramToEnvFile(__app__, self.clVars),
|
|
|
|
|
failMessage=
|
|
|
|
|
_("Can not remove '%s' to %s")%(__app__,
|
|
|
|
|
self.clVars.Get("cl_env_path")[0]))
|
|
|
|
|
failMessage = _("Can not remove '%(app)s' to %(path)s")\
|
|
|
|
|
%{'app':__app__,
|
|
|
|
|
'path':self.clVars.Get("cl_env_path")[0]})
|
|
|
|
|
except (InstallError,DistributiveError),e:
|
|
|
|
|
error = e
|
|
|
|
|
except (Exception),e:
|
|
|
|
|