Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
slapos
Commits
78522b37
Commit
78522b37
authored
May 30, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to play with environment directly.
parent
4cbafd64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/__init__.py
+17
-3
slapos/recipe/erp5/template/zope.conf.in
slapos/recipe/erp5/template/zope.conf.in
+1
-4
No files found.
slapos/recipe/erp5/__init__.py
View file @
78522b37
...
@@ -617,7 +617,19 @@ class Recipe(BaseSlapRecipe):
...
@@ -617,7 +617,19 @@ class Recipe(BaseSlapRecipe):
def
installZope
(
self
,
ip
,
port
,
name
,
zodb_configuration_string
,
def
installZope
(
self
,
ip
,
port
,
name
,
zodb_configuration_string
,
with_timerservice
=
False
,
tidstorage_config
=
None
,
thread_amount
=
1
,
with_timerservice
=
False
,
tidstorage_config
=
None
,
thread_amount
=
1
,
with_deadlockdebugger
=
True
):
with_deadlockdebugger
=
True
,
zope_environment
=
None
):
default_zope_environment
=
dict
(
TMP
=
self
.
tmp_directory
,
TMPDIR
=
self
.
tmp_directory
,
HOME
=
self
.
tmp_directory
,
PATH
=
self
.
bin_directory
)
if
zope_environment
is
None
:
zope_environment
=
default_zope_environment
.
copy
()
else
:
for
envk
,
envv
in
default_zope_environment
.
iteritems
():
if
envk
not
in
zope_environment
:
zope_environment
[
envk
]
=
envv
# Create zope configuration file
# Create zope configuration file
zope_config
=
dict
(
zope_config
=
dict
(
products
=
self
.
options
[
'products'
],
products
=
self
.
options
[
'products'
],
...
@@ -649,8 +661,10 @@ class Recipe(BaseSlapRecipe):
...
@@ -649,8 +661,10 @@ class Recipe(BaseSlapRecipe):
self
.
erp5_directory
,
'Products'
))
self
.
erp5_directory
,
'Products'
))
zope_config
[
'products'
]
=
'
\
n
'
.
join
(
prefixed_products
)
zope_config
[
'products'
]
=
'
\
n
'
.
join
(
prefixed_products
)
zope_config
[
'address'
]
=
'%s:%s'
%
(
ip
,
port
)
zope_config
[
'address'
]
=
'%s:%s'
%
(
ip
,
port
)
zope_config
[
'tmp_directory'
]
=
self
.
tmp_directory
zope_environment_list
=
[]
zope_config
[
'path'
]
=
self
.
bin_directory
for
envk
,
envv
in
zope_environment
.
iteritems
():
zope_environment_list
.
append
(
'%s %s'
%
(
envk
,
envv
))
zope_config
[
'environment'
]
=
"
\
n
"
.
join
(
zope_environment_list
)
zope_wrapper_template_location
=
self
.
getTemplateFilename
(
'zope.conf.in'
)
zope_wrapper_template_location
=
self
.
getTemplateFilename
(
'zope.conf.in'
)
zope_conf_content
=
self
.
substituteTemplate
(
zope_conf_content
=
self
.
substituteTemplate
(
...
...
slapos/recipe/erp5/template/zope.conf.in
View file @
78522b37
...
@@ -9,10 +9,7 @@ instancehome $INSTANCE
...
@@ -9,10 +9,7 @@ instancehome $INSTANCE
# Environment override
# Environment override
<environment>
<environment>
TMP %(tmp_directory)s
%(environment)s
TMPDIR %(tmp_directory)s
HOME %(tmp_directory)s
PATH %(path)s
</environment>
</environment>
# No need to debug
# No need to debug
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment