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
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
Boxiang Sun
slapos.core
Commits
57e68fdb
Commit
57e68fdb
authored
Feb 08, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/grid-buildout-cfg'
parents
d23784e0
4d3f3c36
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+18
-1
No files found.
slapos/grid/SlapObject.py
View file @
57e68fdb
...
...
@@ -37,6 +37,7 @@ import pwd
import
stat
import
tarfile
import
tempfile
import
textwrap
import
utils
import
xmlrpclib
...
...
@@ -169,7 +170,10 @@ class Software(object):
buildout_parameter_list
.
append
(
\
buildout_option
%
(
'networkcache:'
,
value
))
buildout_parameter_list
.
extend
([
'-c'
,
self
.
url
])
buildout_cfg
=
os
.
path
.
join
(
self
.
software_path
,
'buildout.cfg'
)
self
.
createProfileIfMissing
(
buildout_cfg
,
self
.
url
)
buildout_parameter_list
.
extend
([
'-c'
,
buildout_cfg
])
utils
.
bootstrapBuildout
(
self
.
software_path
,
self
.
buildout
,
additional_buildout_parametr_list
=
buildout_parameter_list
)
utils
.
launchBuildout
(
self
.
software_path
,
...
...
@@ -178,6 +182,19 @@ class Software(object):
finally
:
shutil
.
rmtree
(
extends_cache
)
def
createProfileIfMissing
(
self
,
buildout_cfg
,
url
):
root_stat_info
=
os
.
stat
(
self
.
software_root
)
if
not
os
.
path
.
exists
(
buildout_cfg
):
with
open
(
buildout_cfg
,
'wb'
)
as
fout
:
fout
.
write
(
textwrap
.
dedent
(
"""
\
# Created by slapgrid. extends {url}
# but you can change it for development purposes.
[buildout]
extends = {url}
"""
.
format
(
url
=
url
)))
os
.
chown
(
buildout_cfg
,
root_stat_info
.
st_uid
,
root_stat_info
.
st_gid
)
def
uploadSoftwareRelease
(
self
,
tarpath
):
"""
Try to tar and upload an installed Software Release.
...
...
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