Remove unnecessary [products] section

All Products that are not packaged as python distributions need to be placed into a "Products" package since ZEO might need to be able to import them anyway.
parent 301b2ea9
......@@ -93,7 +93,6 @@ class Recipe(GenericBaseRecipe):
# Create zope configuration file
zope_config = dict(
products=self.options['products'],
thread_amount=self.options['thread-amount'],
zodb_root_path=self.options['zodb-path'],
zodb_cache_size=int(self.options['zodb-cache-size']),
......@@ -112,14 +111,7 @@ class Recipe(GenericBaseRecipe):
zope_config['z2_log'] = self.options['z2-log']
zope_config['pid-filename'] = self.options['pid-file']
zope_config['lock-filename'] = self.options['lock-file']
prefixed_products = []
for product in reversed(zope_config['products'].split()):
product = product.strip()
if product:
prefixed_products.append('products %s' % product)
prefixed_products.insert(0, 'products %s' % self.options[
'instance-products'])
zope_config['products'] = '\n'.join(prefixed_products)
zope_config['products'] = 'products %s' % self.options['instance-products']
zope_config['address'] = '%s:%s' % (self.options['ip'], self.options['port'])
zope_config.update(dump_url=self.options['deadlock-path'],
secret=self.options['deadlock-password'])
......
......@@ -335,10 +335,6 @@ recipe = slapos.cookbook:pwgen.stable
ip = {{ ipv4 }}
site-id = {{ site_id }}
zodb-list = {{ json_module.dumps(zodb_connection_list) }}
# XXX: products won't be needed as soon as all ERP5 (and products-deps)
# products will be eggified so then it will be possible to use them thanks to
# availability in software's eggs
products = {{ parameter_dict['products'] }}
[zope-conf-base]
recipe = slapos.recipe.template:jinja2
......
......@@ -55,11 +55,6 @@ wrapper = ${basedirectory:services}/apache
[zope-instance]
recipe = slapos.cookbook:generic.zope
# XXX: products won't be needed as soon as all ERP5 (and products-deps)
# products will be eggified so then it will be possible to use them thanks to
# availability in software's eggs
products = {{ products_list }}
# Options
user = zope
port = 12001
......
......@@ -26,7 +26,6 @@ context =
${:extra-context}
[dynamic-template-tidstorage-parameters]
products = {{ product_list }}
apache = {{ apache_location }}
haproxy = {{ haproxy_location }}
dcron = {{ dcron_location }}
......
......@@ -93,7 +93,7 @@ extra-context =
[template-zope]
< = template-jinja2-base
filename = instance-zope.cfg
md5sum = e00efeefd2d1c09374b169c9d218e137
md5sum = df0763b97b6a8fd31e224eda21bed129
extra-context =
key apache_location apache:location
key aspell_location aspell:location
......@@ -112,7 +112,6 @@ extra-context =
key openssl_location openssl:location
key pdftk_location pdftk:location
key poppler_location poppler:location
key products_list products:list
key sed_location sed:location
key tesseract_location tesseract:location
key w3m_location w3m:location
......@@ -132,7 +131,7 @@ extra-context =
[template-tidstorage]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-tidstorage.cfg.in
md5sum = c1f6873f758af9ee5661be986eeaf9eb
md5sum = ab4983e34b712704b44031fe010d146f
mode = 640
[template-cloudooo]
......@@ -147,7 +146,7 @@ configurator_bt5_list = erp5_core_proxy_field_legacy erp5_full_text_myisam_catal
[template-zope-conf]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/zope.conf.in
md5sum = 0f223ba99a513b197f7cf8acf8c347cf
md5sum = ec4203f1f54b05505d8f35cb5799a75c
mode = 640
[template]
......@@ -155,7 +154,7 @@ mode = 640
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = d9b0d9105a4a55e6fca32e5b550d12f2
md5sum = e78fe31537b479055a6a5932fd55d6dc
extra-context =
key apache_location apache:location
key aspell_location aspell:location
......@@ -189,7 +188,6 @@ extra-context =
key openssl_location openssl:location
key pdftk_location pdftk:location
key poppler_location poppler:location
key product_list products:list
key sed_location sed:location
key template_erp5_development template-erp5-development:rendered
key template_erp5_production template-erp5-production:rendered
......
......@@ -13,11 +13,6 @@ rest-output-encoding utf-8
# XXX: isn't this entry implicit ?
products {{ instance_products }}
{% for product in parameter_dict['products'].split() -%}
{% if product.strip() -%}
products {{ product }}
{% endif -%}
{% endfor -%}
<http-server>
address {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
......
......@@ -198,16 +198,10 @@ revision =
command = "${git:location}/bin/git" clone --quiet --branch "${:branch}" "${:repository}" "${:location}" && if [ -n "${:revision}" ]; then cd "${:location}" && "${git:location}/bin/git" reset --quiet --hard "${:revision}" ; fi
update-command = cd "${:location}" && "${git:location}/bin/git" fetch && if [ -n "${:revision}" ]; then "${git:location}/bin/git" reset --hard "${:revision}"; else "${git:location}/bin/git" reset --hard @{upstream} ; fi
[products]
# XXX: ERP5 related products are not defined as python distributions, so it is
# required to configure them in declarative manner
list =
[fix-products-paths]
recipe = plone.recipe.command
stop-on-error = true
command =
for DIR in "${products-deps:location}"; do cd "$DIR"; rm -f Products ; ln -s . Products; touch __init__.py; done
for DIR in "${erp5:location}"; do cd "$DIR"; rm -f Products ; ln -s product Products; touch product/__init__.py; done
update-command = ${:command}
......@@ -227,7 +221,6 @@ initialization =
import Products
Products.__path__[:0] = filter(None,
os.getenv('INSERT_PRODUCTS_PATH', '').split(os.pathsep))
Products.__path__.extend(reversed('''${products:list}'''.split()))
os.environ['SOFTWARE_HOME'] = os.path.abspath(imp.find_module('Zope2')[1])
os.environ['ZOPE_SCRIPTS'] = ''
parts_directory = '''${buildout:parts-directory}'''
......@@ -243,9 +236,6 @@ initialization =
sys.path[:0] = sum((
glob.glob(os.path.join(parts_directory, x, 'product', '*', 'tests'))
for x in repository_id_list), [])
sys.path[:0] = sum((
glob.glob(os.path.join(x, '*', 'tests'))
for x in reversed('''${products:list}'''.split())), [])
[test_suite_runner]
# XXX: Workaround for fact ERP5Type is not an distribution and does not
......@@ -262,7 +252,6 @@ initialization =
import sys
import Products
[Products.__path__.insert(0, p) for p in reversed(os.environ.get('INSERT_PRODUCTS_PATH', '').split(':')) if p]
Products.__path__.extend(reversed('''${products:list}'''.split()))
import Zope2
os.environ['SOFTWARE_HOME'] = os.path.abspath(os.path.dirname(os.path.dirname(Zope2.__file__)))
os.environ['ZOPE_SCRIPTS'] = ''
......
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