Commit 587e5f93 authored by Łukasz Nowak's avatar Łukasz Nowak

- do magic to prepend in product declaration with 'products' in standaloneinstance recipe

 - update profile using products directive with this recipe


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33027 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f60455c
......@@ -26,10 +26,10 @@ force-zodb-update = false
# instancehome and http-address have to be defined
# User modifable keys:
products =
products ${software_definition:cmf15}
products ${software_definition:products-deps}
products ${software_definition:products-erp5}
products ${software_definition:products-other}/Products
${software_definition:cmf15}
${software_definition:products-deps}
${software_definition:products-erp5}
${software_definition:products-other}/Products
environment =
debug-mode = off
ip-address = 0.0.0.0
......
......@@ -136,7 +136,16 @@ class Recipe(plone.recipe.zope2instance.Recipe, erp5.recipe.createsite.Recipe):
file(self.options['zope_conf_template'].strip()).readlines()
)
template = WithMinusTemplate(template_input_data)
result = template.substitute(self.options.copy())
# make prepend products with 'products'
options_dict = self.options.copy()
if 'products' in options_dict:
prefixed_products = []
for product in options_dict['products'].split('\n'):
product = product.strip()
if product:
prefixed_products.append('products %s' % product)
options_dict['products'] = '\n'.join(prefixed_products)
result = template.substitute(options_dict)
zope_conf_path = os.path.join(location, 'etc', 'zope.conf')
file(zope_conf_path, 'w').write(result)
......
......@@ -45,12 +45,12 @@ http-address = 18080
# until we will have more control over products we need to redefine to insert
# local products to be able to override
products =
products ${:instancehome}/Products/
products ${cmf15:location}
products ${products-deps:location}
products ${products-erp5-development:location}
products ${products-erp5:location}
products ${products-other:location}/Products
${:instancehome}/Products/
${cmf15:location}
${products-deps:location}
${products-erp5-development:location}
${products-erp5:location}
${products-other:location}/Products
# zope.conf template part ENDS
eggs +=
......
......@@ -47,8 +47,8 @@ path ${lib_path}
# to it here).
# In profile use:
# products X
# products Y
# ProductLocationX
# ProductLocationY
${products}
......
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