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
Kasra Jamshidi
slapos
Commits
b54e9b2a
Commit
b54e9b2a
authored
Jul 03, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stork: fix previous commit
parent
aca5d6ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
slapos/recipe/stork/__init__.py
slapos/recipe/stork/__init__.py
+8
-6
software/stork/software.cfg
software/stork/software.cfg
+3
-0
No files found.
slapos/recipe/stork/__init__.py
View file @
b54e9b2a
...
...
@@ -181,8 +181,8 @@ class AppSubmit(GenericBaseRecipe):
stork_submit
=
os
.
path
.
join
(
self
.
options
[
'bin'
].
strip
(),
'stork_submit'
)
file_list
=
'{}'
if
str
(
self
.
options
.
get
(
'src_from_file'
)).
lower
()
in
[
'y'
,
'yes'
,
'1'
,
'true'
]
\
and
os
.
path
.
exists
(
source_url_list
):
if
str
(
self
.
options
.
get
(
'src_from_file'
)).
lower
()
in
[
'y'
,
'yes'
,
'1'
,
'true'
]
:
if
os
.
path
.
exists
(
source_url_list
):
with
open
(
source_url_list
,
'r'
)
as
file_source
:
file_list
=
json
.
loads
(
file_source
.
read
())
else
:
...
...
@@ -191,21 +191,23 @@ class AppSubmit(GenericBaseRecipe):
# XXX - Simply, we don't want to download file twice with stork,
# skip file if it already exists at dest_url (only for file:path)
for
filename
in
file_list
:
log_name
=
filename
if
dest_url
.
startswith
(
'file:'
):
destination
=
os
.
path
.
join
(
dest_url
.
replace
(
'file:'
,
''
),
filename
)
if
os
.
path
.
exists
(
destination
+
'_part'
)
or
os
.
path
.
exists
(
destination
):
continue
download_dest_list
[
filename
]
=
destination
filename
=
filename
+
'_part'
stork_file
.
write
(
"""[
src_url="%s";
dest_url="%s/%s
_part
";
dest_url="%s/%s";
err = "%s.err";
output = "%s.out";
dap_type = "transfer";
set_permission = "600" ;
]
"""
%
(
file_list
[
filename
],
dest_url
,
filename
,
filename
,
file
name
)
"""
%
(
file_list
[
filename
],
dest_url
,
filename
,
log_name
,
log_
name
)
)
parameter
=
dict
(
submit
=
stork_submit
,
...
...
software/stork/software.cfg
View file @
b54e9b2a
[buildout]
develop =
${:parts-directory}/slapos.cookbook-repository
parts =
stork
slapos-cookbook
...
...
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