Commit fa570fb7 authored by Yoshinori Okuji's avatar Yoshinori Okuji

It seems that sometimes required versions are specified with parentheses......

It seems that sometimes required versions are specified with parentheses... Which is the right format? For now, support both. Also, remove christophe's ads.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17282 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d786b351
......@@ -4027,8 +4027,6 @@ Business Template is a set of definitions, such as skins, portal types and categ
# Make sure that everything is sane.
self.clean()
# Update revision number
# <christophe@nexedi.com>
self.updateRevisionNumber()
self._setTemplateFormatVersion(1)
......@@ -4743,7 +4741,6 @@ Business Template is a set of definitions, such as skins, portal types and categ
for item_name in self._item_name_list:
getattr(self, item_name).importFile(bta)
#By christophe Dumez <christophe@nexedi.com>
def getItemsList(self):
"""Return list of items in business template
"""
......@@ -4754,7 +4751,6 @@ Business Template is a set of definitions, such as skins, portal types and categ
items_list.extend(item.getKeys())
return items_list
#By christophe Dumez <christophe@nexedi.com>
def checkDependencies(self):
"""
Check if all the dependencies of the business template
......@@ -4767,6 +4763,9 @@ Business Template is a set of definitions, such as skins, portal types and categ
for dependency_couple in dependency_list:
dependency_couple_list = dependency_couple.strip().split(' ', 1)
dependency = dependency_couple_list[0]
if dependency.startswith('('):
# Something like "(>= 1.0rc6)".
dependency = dependency[1:-1]
if dependency in (None, ''):
continue
version_restriction = None
......@@ -4942,7 +4941,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
else:
diff_msg = 'No diff'
else: # Added By <christophe@nexedi.com>
else:
diff_msg += 'Unsupported file !'
if compare_to_zodb:
......
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