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
Steven Gueguen
slapos
Commits
e3f0c490
Commit
e3f0c490
authored
Jul 11, 2011
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set PATH in slaprunner wrapper
parent
31e7f0e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
slapos/recipe/slaprunner/__init__.py
slapos/recipe/slaprunner/__init__.py
+4
-2
slapos/recipe/slaprunner/execute.py
slapos/recipe/slaprunner/execute.py
+3
-1
No files found.
slapos/recipe/slaprunner/__init__.py
View file @
e3f0c490
...
@@ -68,9 +68,11 @@ class Recipe(BaseSlapRecipe):
...
@@ -68,9 +68,11 @@ class Recipe(BaseSlapRecipe):
self
.
substituteTemplate
(
pkg_resources
.
resource_filename
(
__name__
,
self
.
substituteTemplate
(
pkg_resources
.
resource_filename
(
__name__
,
'template/slapos.cfg.in'
),
configuration
))
'template/slapos.cfg.in'
),
configuration
))
self
.
path_list
.
append
(
config_file
)
self
.
path_list
.
append
(
config_file
)
execute_arguments
=
dict
(
path
=
os
.
environ
[
'PATH'
],
args
=
[
self
.
options
[
'slaprunner'
].
strip
(),
config_file
])
self
.
path_list
.
extend
(
zc
.
buildout
.
easy_install
.
scripts
([(
'slaprunner'
,
self
.
path_list
.
extend
(
zc
.
buildout
.
easy_install
.
scripts
([(
'slaprunner'
,
'slapos.recipe.slaprunner.execute'
,
'execute'
)],
self
.
ws
,
sys
.
executable
,
'slapos.recipe.slaprunner.execute'
,
'execute'
)],
self
.
ws
,
sys
.
executable
,
self
.
wrapper_directory
,
arguments
=
[
self
.
options
[
'slaprunner'
].
strip
(),
self
.
wrapper_directory
,
arguments
=
execute_arguments
))
config_file
]))
self
.
setConnectionDict
(
dict
(
url
=
'http://[%s]:%s'
%
(
ipv6
,
runner_port
)))
self
.
setConnectionDict
(
dict
(
url
=
'http://[%s]:%s'
%
(
ipv6
,
runner_port
)))
return
self
.
path_list
return
self
.
path_list
slapos/recipe/slaprunner/execute.py
View file @
e3f0c490
...
@@ -3,4 +3,6 @@ import os
...
@@ -3,4 +3,6 @@ import os
def
execute
(
args
):
def
execute
(
args
):
"""Portable execution with process replacement"""
"""Portable execution with process replacement"""
os
.
execv
(
args
[
0
],
args
)
if
args
.
get
(
"path"
,
None
):
os
.
environ
[
'PATH'
]
=
args
[
"path"
]
os
.
execv
(
args
[
"launch_args"
][
0
],
args
[
"launch_args"
])
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