zope2instance has to set software home
Bug #162372 reported by
Wichert Akkerman
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 getConfiguratio
'/Users/
softwarehome is set in App.FindHomes:
try:
home = os.environ[
except KeyError:
home = os.path.
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 |
Changed in zope2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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 ======= ======= ======= ======= ======= ======= ======= ======= ==== 'SOFTWARE_ HOME'] abspath( package_ home(Products. __dict_ _)) abspath( package_ home(Zope2. __dict_ _))
=======
--- FindHomes.py (revision 81806)
+++ FindHomes.py (working copy)
@@ -26,7 +26,8 @@
try:
home = os.environ[
except KeyError:
- home = os.path.
+ import Zope2
+ home = os.path.
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.