[Zope-Checkins] CVS: Zope/lib/python/OFS - Application.py:1.188

Jim Fulton jim@zope.com
Tue, 20 Aug 2002 15:37:53 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv2491/lib/python/OFS

Modified Files:
	Application.py 
Log Message:
Repaired some deficiencies in Zope's implicit installation.

- Documented FORCE_PRODUCT_LOAD

- Changed FORCE_PRODUCT_LOAD so that if it is set, it determines
  whether products are installed regardless of whether ZEO_CACHE is
  set. This means that you can disable product installation by setting
  FORCE_PRODUCT_LOAD to an empty string even if you are not using a
  ZEO persistent cache.

- Fixed the help system and Zope Tutorial product to honor
  FORCE_PRODUCT_LOAD.



=== Zope/lib/python/OFS/Application.py 1.187 => 1.188 ===
--- Zope/lib/python/OFS/Application.py:1.187	Wed Aug 14 17:42:55 2002
+++ Zope/lib/python/OFS/Application.py	Tue Aug 20 15:37:52 2002
@@ -31,6 +31,7 @@
 from zLOG import LOG, ERROR, WARNING, INFO
 from HelpSys.HelpSys import HelpSys
 from Acquisition import aq_base
+from App.Product import doInstall
 
 class Application(Globals.ApplicationDefaultPermissions,
                   ZDOM.Root, Folder.Folder,
@@ -431,8 +432,7 @@
     # Note that the code from here on only runs if we are not a ZEO
     # client, or if we are a ZEO client and we've specified by way
     # of env variable that we want to force products to load.
-    if (os.environ.get('ZEO_CLIENT') and
-        not os.environ.get('FORCE_PRODUCT_LOAD')):
+    if not doInstall():
         return
 
     # Check for dangling pointers (broken zclass dependencies) in the
@@ -693,10 +693,7 @@
                 Folder.Folder.__dict__['__ac_permissions__']=tuple(
                     list(Folder.Folder.__ac_permissions__)+new_permissions)
 
-            if (os.environ.get('ZEO_CLIENT') and
-                not os.environ.get('FORCE_PRODUCT_LOAD')):
-                # we don't want to install products from clients
-                # (unless FORCE_PRODUCT_LOAD is defined).
+            if not doInstall():
                 get_transaction().abort()
             else:
                 get_transaction().note('Installed product '+product_name)