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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Matevz Golob
slapos
Commits
2d549b08
Commit
2d549b08
authored
Mar 06, 2019
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrapper recipe: do not create two wrappers for the same executable if hash change
parent
8facbb99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
slapos/recipe/wrapper.py
slapos/recipe/wrapper.py
+8
-0
No files found.
slapos/recipe/wrapper.py
View file @
2d549b08
...
@@ -25,7 +25,9 @@
...
@@ -25,7 +25,9 @@
#
#
##############################################################################
##############################################################################
import
os
import
shlex
import
shlex
import
glob
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
...
@@ -68,7 +70,13 @@ class Recipe(GenericBaseRecipe):
...
@@ -68,7 +70,13 @@ class Recipe(GenericBaseRecipe):
if
hash_files
:
if
hash_files
:
hash_file_list
=
hash_files
.
split
()
hash_file_list
=
hash_files
.
split
()
hash
=
self
.
generateHashFromFiles
(
hash_file_list
)
hash
=
self
.
generateHashFromFiles
(
hash_file_list
)
wrapper_path_list
=
glob
.
glob
(
'%s-*'
%
wrapper_path
)
wrapper_path
=
"%s-%s"
%
(
wrapper_path
,
hash
)
wrapper_path
=
"%s-%s"
%
(
wrapper_path
,
hash
)
# len(wrapper_path_list) should be 1
for
path
in
wrapper_path_list
:
# if path != wrapper_path, then hash changed, we remove old hash
if
path
!=
wrapper_path
:
os
.
unlink
(
path
)
return
self
.
createWrapper
(
wrapper_path
,
args
,
environment
,
**
kw
)
return
self
.
createWrapper
(
wrapper_path
,
args
,
environment
,
**
kw
)
...
...
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