Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
2f05438b
Commit
2f05438b
authored
Jun 06, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo
Fix additional_buildout_parametr_list to read additional_buildout_parameter_list
parent
e5ad44c2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+2
-2
slapos/grid/utils.py
slapos/grid/utils.py
+10
-10
slapos/tests/slapobject.py
slapos/tests/slapobject.py
+3
-3
No files found.
slapos/grid/SlapObject.py
View file @
2f05438b
...
...
@@ -186,11 +186,11 @@ class Software(object):
utils
.
bootstrapBuildout
(
path
=
self
.
software_path
,
buildout
=
self
.
buildout
,
logger
=
self
.
logger
,
additional_buildout_parametr_list
=
buildout_parameter_list
)
additional_buildout_paramet
e
r_list
=
buildout_parameter_list
)
utils
.
launchBuildout
(
path
=
self
.
software_path
,
buildout_binary
=
os
.
path
.
join
(
self
.
software_path
,
'bin'
,
'buildout'
),
logger
=
self
.
logger
,
additional_buildout_parametr_list
=
buildout_parameter_list
)
additional_buildout_paramet
e
r_list
=
buildout_parameter_list
)
finally
:
shutil
.
rmtree
(
extends_cache
)
...
...
slapos/grid/utils.py
View file @
2f05438b
...
...
@@ -229,9 +229,9 @@ def dropPrivileges(uid, gid, logger):
def
bootstrapBuildout
(
path
,
logger
,
buildout
=
None
,
additional_buildout_parametr_list
=
None
):
if
additional_buildout_parametr_list
is
None
:
additional_buildout_parametr_list
=
[]
additional_buildout_paramet
e
r_list
=
None
):
if
additional_buildout_paramet
e
r_list
is
None
:
additional_buildout_paramet
e
r_list
=
[]
# Reads uid/gid of path, launches buildout with thoses privileges
stat_info
=
os
.
stat
(
path
)
uid
=
stat_info
.
st_uid
...
...
@@ -240,7 +240,7 @@ def bootstrapBuildout(path, logger, buildout=None,
invocation_list
=
[
sys
.
executable
,
'-S'
]
if
buildout
is
not
None
:
invocation_list
.
append
(
buildout
)
invocation_list
.
extend
(
additional_buildout_parametr_list
)
invocation_list
.
extend
(
additional_buildout_paramet
e
r_list
)
else
:
try
:
__import__
(
'zc.buildout'
)
...
...
@@ -249,12 +249,12 @@ def bootstrapBuildout(path, logger, buildout=None,
'Consider having zc.buildout available in search path.'
)
invocation_list
.
append
(
pkg_resources
.
resource_filename
(
__name__
,
'zc.buildout-bootstap.py'
))
invocation_list
.
extend
(
additional_buildout_parametr_list
)
invocation_list
.
extend
(
additional_buildout_paramet
e
r_list
)
else
:
# buildout is importable, so use this one
invocation_list
.
extend
([
"-c"
,
"import sys ; sys.path="
+
str
(
sys
.
path
)
+
" ; import zc.buildout.buildout ; sys.argv[1:1]="
+
repr
(
additional_buildout_parametr_list
+
[
'bootstrap'
])
+
" ; "
repr
(
additional_buildout_paramet
e
r_list
+
[
'bootstrap'
])
+
" ; "
"zc.buildout.buildout.main()"
])
if
buildout
is
not
None
:
...
...
@@ -283,10 +283,10 @@ def bootstrapBuildout(path, logger, buildout=None,
def
launchBuildout
(
path
,
buildout_binary
,
logger
,
additional_buildout_parametr_list
=
None
):
additional_buildout_paramet
e
r_list
=
None
):
""" Launches buildout."""
if
additional_buildout_parametr_list
is
None
:
additional_buildout_parametr_list
=
[]
if
additional_buildout_paramet
e
r_list
is
None
:
additional_buildout_paramet
e
r_list
=
[]
# Reads uid/gid of path, launches buildout with thoses privileges
stat_info
=
os
.
stat
(
path
)
uid
=
stat_info
.
st_uid
...
...
@@ -300,7 +300,7 @@ def launchBuildout(path, buildout_binary, logger,
invocation_list
=
line
.
split
()
+
[
buildout_binary
]
# Run buildout without reading user defaults
invocation_list
.
append
(
'-U'
)
invocation_list
.
extend
(
additional_buildout_parametr_list
)
invocation_list
.
extend
(
additional_buildout_paramet
e
r_list
)
try
:
umask
=
os
.
umask
(
SAFE_UMASK
)
logger
.
debug
(
'Set umask from %03o to %03o'
%
(
umask
,
SAFE_UMASK
))
...
...
slapos/tests/slapobject.py
View file @
2f05438b
...
...
@@ -40,9 +40,9 @@ class FakeCallAndRead:
self
.
external_command_list
=
[]
def
__call__
(
self
,
*
args
,
**
kwargs
):
additional_buildout_parametr_list
=
\
kwargs
.
get
(
'additional_buildout_parametr_list'
)
self
.
external_command_list
.
extend
(
additional_buildout_parametr_list
)
additional_buildout_paramet
e
r_list
=
\
kwargs
.
get
(
'additional_buildout_paramet
e
r_list'
)
self
.
external_command_list
.
extend
(
additional_buildout_paramet
e
r_list
)
FakeCallAndRead
=
FakeCallAndRead
()
...
...
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