Commit 7a71459c authored by Rafael Monnerat's avatar Rafael Monnerat

ERP5Configurator: Install bt5 by force and without activities

  If the user wants actitivites, it should create multiples StandardBT5ConfiguratorItems,
  This should accellerate Tests based on ERP5Configurator.

  This should be recoded, but it should speed up bootstrap of a site,
  as get modified objects are not called.
parent a9ef9eee
...@@ -83,7 +83,8 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject): ...@@ -83,7 +83,8 @@ class StandardBT5ConfiguratorItem(ConfiguratorItemMixin, XMLObject):
template_tool.installBusinessTemplateListFromRepository([bt5_id], template_tool.installBusinessTemplateListFromRepository([bt5_id],
update_catalog=self.getUpdateCatalog(0), update_catalog=self.getUpdateCatalog(0),
install_dependency=self.getInstallDependency(1), install_dependency=self.getInstallDependency(1),
activate=True) force_all=True,
activate=False)
return [self._createConstraintMessage('%s should be installed' % bt5_id),] return [self._createConstraintMessage('%s should be installed' % bt5_id),]
......
...@@ -1204,7 +1204,7 @@ class TemplateTool (BaseTool): ...@@ -1204,7 +1204,7 @@ class TemplateTool (BaseTool):
'installBusinessTemplateListFromRepository') 'installBusinessTemplateListFromRepository')
def installBusinessTemplateListFromRepository(self, template_list, def installBusinessTemplateListFromRepository(self, template_list,
only_different=True, update_catalog=False, activate=False, only_different=True, update_catalog=False, activate=False,
install_dependency=False): install_dependency=False, force_all=False):
"""Installs template_list from configured repositories by default only newest""" """Installs template_list from configured repositories by default only newest"""
# XXX-Luke: This method could replace # XXX-Luke: This method could replace
# TemplateTool_installRepositoryBusinessTemplateList while still being # TemplateTool_installRepositoryBusinessTemplateList while still being
...@@ -1234,7 +1234,9 @@ class TemplateTool (BaseTool): ...@@ -1234,7 +1234,9 @@ class TemplateTool (BaseTool):
if bt is not None and bt['revision'] == installed_bt5_dict.get(bt_id): if bt is not None and bt['revision'] == installed_bt5_dict.get(bt_id):
continue continue
bt_url = '%s/%s' % (repository, bt_id) bt_url = '%s/%s' % (repository, bt_id)
param_dict = dict(download_url=bt_url, only_different=only_different) param_dict = dict(download_url=bt_url,
only_different=only_different,
reinstall=force_all)
param_dict["update_catalog"] = update_catalog param_dict["update_catalog"] = update_catalog
if activate: if activate:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment