Commit e4378ff8 authored by Chris McDonough's avatar Chris McDonough

Disassociate zeo-client-name from enable-product-installation ZConfig keys.

In the past, if you ran an appserver as ZEO client with a persistent
cache, the startup logic prevented products from being loaded.  This
was a hack that got baked in via the weird interaction between the
FORCE_PRODUCT_LOAD and ZEO_CLIENT environment variables and was carried
over into Zope 2.7 by inertia.  Now they have nothing to do with each other
and can be specified independently.
parent 564f8f8d
......@@ -591,7 +591,5 @@ def ihasattr(o, name):
def doInstall():
if os.environ.has_key('FORCE_PRODUCT_LOAD'):
return not not os.environ['FORCE_PRODUCT_LOAD']
return getConfiguration().enable_product_installation
return not os.environ.get('ZEO_CLIENT')
......@@ -22,10 +22,6 @@ def debug_mode(value):
Globals.DevelopmentMode = not not value
return value
def enable_product_installation(value):
value and _setenv('FORCE_PRODUCT_LOAD', '1')
return value
def locale(value):
import locale
locale.setlocale(locale.LC_ALL, value)
......
......@@ -302,16 +302,13 @@
<metadefault>unset</metadefault>
</key>
<key name="enable-product-installation" datatype="boolean" default="on"
handler="enable_product_installation">
<key name="enable-product-installation" datatype="boolean" default="on">
<description>
If this directive is turned on, Zope performs 'product installation'
(the registration of Python modules in various Products directories)
at startup. Turning this off can speed Zope startup time, but it can
also cause your Control_Panel Product list to become desynchronized
with the contents of your Products directories. If the
'zeo_client_name' directive is set, and this directive is unset, this
directive will be implicitly turned off.
with the contents of your Products directories.
</description>
<metadefault>on</metadefault>
</key>
......
......@@ -140,25 +140,12 @@ instancehome $INSTANCE
# Directive: enable-product-installation
#
# Description:
# If this directive is turned on and the 'zeo-client-name' setting
# is also set, Zope performs 'product installation' (the
# registration of Python modules in various Products directories)
# If this directive is turned, Zope performs 'product installation'
# (the registration of Python modules in various Products directories)
# at startup. Turning this off can speed Zope/ZEO startup time,
# but it can also cause your Control_Panel Product list to become
# desynchronized with the contents of your Products
# directories. If the 'zeo-client-name' directive is set, and this
# directive is unset, this directive will be implicitly turned off
# By default, it is on. A table explaining how the effective
# combinations of 'enable-product-installation' and
# 'zeo-client-name' effect the behavior of product loading is
# below:
#
# 'enable-product-installation' 'zeo-client-name' result
# -------------------------------------------------------
# on unset Products are loaded
# on set Products are loaded
# off unset Products are loaded
# off set Products are not loaded
# directories.
#
# Default: on
#
......@@ -166,7 +153,6 @@ instancehome $INSTANCE
#
# enable-product-installation off
# Directive: locale
#
# Description:
......@@ -606,8 +592,7 @@ instancehome $INSTANCE
# zeo-client-name, the client cache is stored in temporary files
# which are removed when the ClientStorage shuts down. The value
# of zeo-client-name is used to uniquely identify the local cache
# files created if this Zope is a ZEO client. See also
# 'enable-product-installation'.
# files created if this Zope is a ZEO client.
#
# Default: unset
#
......
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