Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.cmmi
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
Xavier Thompson
slapos.recipe.cmmi
Commits
c42c6aee
Commit
c42c6aee
authored
Oct 04, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean install directory if it already exists during recipe's installation
parent
ba793c61
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
slapos/recipe/cmmi/__init__.py
slapos/recipe/cmmi/__init__.py
+9
-8
No files found.
slapos/recipe/cmmi/__init__.py
View file @
c42c6aee
...
...
@@ -335,11 +335,12 @@ class Recipe(object):
compile_dir
=
self
.
options
[
'path'
]
current_dir
=
os
.
getcwd
()
try
:
os
.
mkdir
(
self
.
options
[
'default-location'
])
except
OSError
as
e
:
if
e
.
errno
==
errno
.
EEXIST
:
pass
location
=
self
.
options
[
'default-location'
]
# Clean the install directory if it already exists as it is
# a remain from a previous failed installation
if
os
.
path
.
exists
(
location
):
shutil
.
rmtree
(
location
)
os
.
mkdir
(
location
)
os
.
chdir
(
compile_dir
)
tmp_path
=
self
.
environ
[
'TMP'
]
shutil
.
rmtree
(
tmp_path
,
True
)
...
...
@@ -451,11 +452,11 @@ class Recipe(object):
del
self
.
options
[
'compile-directory'
]
if
self
.
options
[
'shared'
]
==
''
:
parts
.
append
(
self
.
options
[
'default-location'
]
)
parts
.
append
(
location
)
self
.
fix_shebang
(
self
.
options
[
'default-location'
]
)
self
.
fix_shebang
(
location
)
if
self
.
options
[
'shared'
]:
slapos
.
recipe
.
downloadunpacked
.
make_read_only_recursively
(
self
.
options
[
'default-location'
]
)
slapos
.
recipe
.
downloadunpacked
.
make_read_only_recursively
(
location
)
return
parts
def
fix_shebang
(
self
,
location
):
...
...
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