Comment 5 for bug 143046

Revision history for this message
Tres Seaver (tseaver) wrote :

I can confirm that the duplication is present: basically, the zopectl and runzope scripts set the 'INSTANCE_HOME' environment variable out of supersition:

 $ cd projects/Zope-CVS/Zope-2.12-branch/
 $ bin/mkzopeinstance -d /tmp/z212 -u zope:r00ler
 $ cd /tmp/z212
 $ grep INSTANCE bin/* etc/*
 bin/runzope:INSTANCE_HOME="/tmp/z212"
 bin/runzope:export INSTANCE_HOME
 bin/runzope.bat:@set INSTANCE_HOME=/tmp/z212
 bin/runzope.bat:@set CONFIG_FILE=%INSTANCE_HOME%\etc\zope.conf
 bin/zopectl:INSTANCE_HOME="/tmp/z212"
 bin/zopectl:export INSTANCE_HOME
 bin/zopectl.bat:@set INSTANCE_HOME=/tmp/z212
 bin/zopectl.bat:@set CONFIG_FILE=%INSTANCE_HOME%\etc\zope.conf
 etc/zope.conf:%define INSTANCE /tmp/z212
 etc/zope.conf:instancehome $INSTANCE
 etc/zope.conf:# Default: $INSTANCE/var
 etc/zope.conf:# Default: $INSTANCE/lib/python
 etc/zope.conf:# path $INSTANCE/mypymodules
 etc/zope.conf:# Default: $INSTANCE/Products
 etc/zope.conf:# mime-types $INSTANCE/etc/mime.types
 etc/zope.conf:# publisher-profile-file $INSTANCE/var/profile.dat
 etc/zope.conf: path $INSTANCE/log/event.log
 etc/zope.conf: path $INSTANCE/log/Z2.log
 etc/zope.conf:# path $INSTANCE/log/trace.log
 etc/zope.conf: path $INSTANCE/var/Data.fs
 etc/zope.conf:# var $INSTANCE/var

Deleting the assignment from the two scripts still allows Zope to start,
which suggests that they are unnecessary. In fact, they predate the
ZConfig handler which sets the environment variable based on the config