zope2instance has to set software home

Bug #162372 reported by Wichert Akkerman
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Undecided
Wichert Akkerman
collective.buildout
Fix Released
Critical
Wichert Akkerman

Bug Description

ploneout trunk is horribly broken at the moment. A Zope startup fails with ImageFile unable to find images. This is the root cause for that:

(Pdb) p getConfiguration().softwarehome
'/Users/wichert/Development/instances/ploneout/src/Products.CMFPlone'

softwarehome is set in App.FindHomes:

try:
    home = os.environ['SOFTWARE_HOME']
except KeyError:
    home = os.path.abspath(package_home(Products.__dict__))

Now that we have more Products.* eggs this will not work unless we set SOFTWARE_HOME.

Changed in collective.buildout:
assignee: nobody → wichert
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Wichert Akkerman (wichert) wrote :

This is a bit tricky since we can not set SOFTWARE_HOME from zope.conf and insisting on having it in the environment everywhere is tedious. I have a workaround though:

Index: FindHomes.py
===================================================================
--- FindHomes.py (revision 81806)
+++ FindHomes.py (working copy)
@@ -26,7 +26,8 @@
 try:
     home = os.environ['SOFTWARE_HOME']
 except KeyError:
- home = os.path.abspath(package_home(Products.__dict__))
+ import Zope2
+ home = os.path.abspath(package_home(Zope2.__dict__))

     home, e = os.path.split(home)
     d, e = os.path.split(home)

This gets around the problem by basing the path on something that is guaranteed not to be a namespace but always located inside the Zope2 software home.

Changed in zope2:
assignee: nobody → wichert
status: New → In Progress
Revision history for this message
Wichert Akkerman (wichert) wrote :

Commited to Zope trunk in 81815
Commited to Zope-2.10 in 81816

Changed in zope2:
status: In Progress → Fix Committed
Changed in collective.buildout:
status: In Progress → Fix Committed
Revision history for this message
Hanno Schlichting (hannosch) wrote :

For ploneout trunk the relevant change has been released as part of Zope 2.11 beta1.

Changed in collective.buildout:
status: Fix Committed → Fix Released
Changed in zope2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.