Commit 151a120e authored by Arnaud Fontaine's avatar Arnaud Fontaine

When updating bt5, update repositories before even if they are already present

because new bt5 may have been added in the meantime.
parent 9f72c8fe
...@@ -155,21 +155,17 @@ class ERP5Updater(object): ...@@ -155,21 +155,17 @@ class ERP5Updater(object):
def isBusinessTemplateUpdated(self): def isBusinessTemplateUpdated(self):
return len(self.getMissingBusinessTemplateSet()) == 0 return len(self.getMissingBusinessTemplateSet()) == 0
def isBusinessTemplateRepositoryUpdated(self):
return len(self.getMissingBusinessTemplateRepositoryList()) == 0
def updateBusinessTemplateList(self): def updateBusinessTemplateList(self):
""" Update Business Template Configuration, including the repositories """ Update Business Template Configuration, including the repositories
""" """
if not self.isBusinessTemplateUpdated(): if not self.isBusinessTemplateUpdated():
# Before update the business templates, it is required to make # Before updating the business templates, it is required to make sure
# sure the repositories are updated. # the repositories are updated, thus update them even if they are
if not self.isBusinessTemplateRepositoryUpdated(): # already present because there may be new business templates...
# Require to update Business template Repository repository_list = self.getSystemSignatureDict(
repository_list = self.getSystemSignatureDict( "business_template_repository_list", [])
"business_template_repository_list", []) repository_list.extend(self.getMissingBusinessTemplateRepositoryList())
repository_list.extend(self.getMissingBusinessTemplateRepositoryList()) self._setRepositoryList(repository_list)
self._setRepositoryList(repository_list)
# Require to update Business template # Require to update Business template
self._installBusinessTemplateList(list(self.getMissingBusinessTemplateSet())) self._installBusinessTemplateList(list(self.getMissingBusinessTemplateSet()))
......
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