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
Ivan Tyagov
slapos
Commits
a2dec438
Commit
a2dec438
authored
Mar 28, 2013
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BOINC make_project: avoid accidental destruction project
parent
c658d8ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
slapos/recipe/boinc/__init__.py
slapos/recipe/boinc/__init__.py
+7
-4
slapos/recipe/boinc/configure.py
slapos/recipe/boinc/configure.py
+15
-0
No files found.
slapos/recipe/boinc/__init__.py
View file @
a2dec438
...
@@ -151,17 +151,20 @@ class Recipe(GenericBaseRecipe):
...
@@ -151,17 +151,20 @@ class Recipe(GenericBaseRecipe):
self
.
mysqlhost
,
"--user_name"
,
slapuser
,
"--srcdir"
,
self
.
mysqlhost
,
"--user_name"
,
slapuser
,
"--srcdir"
,
self
.
sourcedir
,
"--no_query"
]
self
.
sourcedir
,
"--no_query"
]
drop_install
=
self
.
haschanges
()
drop_install
=
self
.
haschanges
()
request_make_boinc
=
os
.
path
.
join
(
self
.
home
,
'.make_project'
)
if
drop_install
:
if
drop_install
:
#Allow to restart Boinc installation from the begining
#Allow to restart Boinc installation from the begining
launch_args
+=
[
"--delete_prev_inst"
,
"--drop_db_first"
]
launch_args
+=
[
"--delete_prev_inst"
,
"--drop_db_first"
]
open
(
request_make_boinc
,
'w'
).
write
(
'Make Requested'
)
if
os
.
path
.
exists
(
readme_file
):
if
os
.
path
.
exists
(
readme_file
):
os
.
unlink
(
readme_file
)
os
.
unlink
(
readme_file
)
launch_args
+=
[
self
.
project
,
niceprojectname
]
launch_args
+=
[
self
.
project
,
niceprojectname
]
install_wrapper
=
self
.
createPythonScript
(
os
.
path
.
join
(
self
.
wrapperdir
,
install_wrapper
=
self
.
createPythonScript
(
'make_project'
),
os
.
path
.
join
(
self
.
wrapperdir
,
'make_project'
),
'slapos.recipe.librecipe.execute.executee_wait'
,
'%s.configure.makeProject'
%
__name__
,
(
launch_args
,
[
file_status
],
environment
)
dict
(
launch_args
=
launch_args
,
request_file
=
request_make_boinc
,
make_sig
=
file_status
,
env
=
environment
)
)
)
path_list
.
append
(
install_wrapper
)
path_list
.
append
(
install_wrapper
)
...
...
slapos/recipe/boinc/configure.py
View file @
a2dec438
...
@@ -122,6 +122,21 @@ def startProcess(launch_args, env=None, cwd=None, stdout=subprocess.PIPE):
...
@@ -122,6 +122,21 @@ def startProcess(launch_args, env=None, cwd=None, stdout=subprocess.PIPE):
return
False
return
False
return
True
return
True
def
makeProject
(
args
):
"""Run BOINC make_project script but once only"""
#Wait for DateBase initialization...
checkFile
(
args
[
'make_sig'
],
3
)
print
"Cheking if needed to run BOINC make_project..."
if
os
.
path
.
exists
(
args
[
'request_file'
]):
env
=
os
.
environ
env
[
'PATH'
]
=
args
[
'env'
][
'PATH'
]
env
[
'PYTHONPATH'
]
=
args
[
'env'
][
'PYTHONPATH'
]
if
startProcess
(
args
[
'launch_args'
],
env
=
env
):
os
.
unlink
(
args
[
'request_file'
])
print
"Finished running BOINC make_projet...Ending"
else
:
print
"No new request for make_project. Exiting..."
def
services
(
args
):
def
services
(
args
):
"""This function configure a new installed boinc project instance"""
"""This function configure a new installed boinc project instance"""
...
...
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