Commit 1d9da5f3 authored by Ayush Tiwari's avatar Ayush Tiwari

TemplateTool: SImplify reduction function during migration of BT to BM

parent 344b2c7c
...@@ -852,22 +852,21 @@ class TemplateTool (BaseTool): ...@@ -852,22 +852,21 @@ class TemplateTool (BaseTool):
version = dependency[1] version = dependency[1]
if version: if version:
version = version[1:-1] version = version[1:-1]
base_bt = self.getLastestBTOnRepos(dependency[0], version)
else: else:
try: version = None
base_bt = self.getLastestBTOnRepos(dependency[0]) try:
except BusinessTemplateIsMeta: base_bt = self.getLastestBTOnRepos(dependency[0], version)
bt_list = self.getProviderList(dependency[0]) except BusinessTemplateIsMeta:
# We explicilty use the Business Template which is used the most bt_list = self.getProviderList(dependency[0])
# while dealing with provision list # We explicilty use the Business Template which is used the most
repository_list = self.getRepositoryList() # while dealing with provision list
if dependency[0] == 'erp5_full_text_catalog': repository_list = self.getRepositoryList()
base_bt = [repository_list[1], 'erp5_full_text_mroonga_catalog'] if dependency[0] == 'erp5_full_text_catalog':
if dependency[0] == 'erp5_view_style': base_bt = [repository_list[0], 'erp5_full_text_mroonga_catalog']
base_bt = [repository_list[0], 'erp5_xhtml_style'] if dependency[0] == 'erp5_view_style':
if dependency[0] == 'erp5_catalog': base_bt = [repository_list[1], 'erp5_xhtml_style']
base_bt = [repository_list[0], 'erp5_mysql_innodb_catalog'] if dependency[0] == 'erp5_catalog':
# XXX: Create path for the BT(s) here base_bt = [repository_list[1], 'erp5_mysql_innodb_catalog']
# Download the base_bt # Download the base_bt
base_bt_path = os.path.join(base_bt[0], base_bt[1]) base_bt_path = os.path.join(base_bt[0], base_bt[1])
......
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