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.build
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
Thomas Leymonerie
slapos.recipe.build
Commits
a2599788
Commit
a2599788
authored
Oct 23, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: Remove downloaded files at the end.
parent
84fbe625
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
CHANGES.txt
CHANGES.txt
+8
-0
setup.py
setup.py
+1
-1
slapos/recipe/build/__init__.py
slapos/recipe/build/__init__.py
+13
-0
No files found.
CHANGES.txt
View file @
a2599788
Changes
=======
0.14 (2014-10-23)
-----------------
* build: Remove downloaded files at the end.
0.13 (2014-10-08)
-----------------
* gitclone: do not delete the working copy if develop is set.
* gitclone: revision has priority over branch.
* gitclone: empty parameter equals no parameter.
...
...
setup.py
View file @
a2599788
from
setuptools
import
setup
,
find_packages
version
=
'0.1
3
'
version
=
'0.1
4
'
name
=
'slapos.recipe.build'
long_description
=
open
(
"README.rst"
).
read
()
+
"
\
n
"
+
\
open
(
"CHANGES.txt"
).
read
()
+
"
\
n
"
...
...
slapos/recipe/build/__init__.py
View file @
a2599788
...
...
@@ -188,6 +188,7 @@ class Script:
download
=
zc
.
buildout
.
download
.
Download
(
self
.
buildout
[
'buildout'
],
hash_name
=
True
,
cache
=
self
.
buildout
[
'buildout'
].
get
(
'download-cache'
))
path
,
is_temp
=
download
(
url
,
md5sum
=
md5sum
)
self
.
cleanup_file_list
.
append
(
path
)
return
path
def
extract
(
self
,
path
):
...
...
@@ -255,6 +256,7 @@ class Script:
def
__init__
(
self
,
buildout
,
name
,
options
):
self
.
cleanup_dir_list
=
[]
self
.
cleanup_file_list
=
[]
self
.
options
=
options
self
.
buildout
=
buildout
self
.
name
=
name
...
...
@@ -326,6 +328,13 @@ class Script:
shutil
.
rmtree
(
d
)
else
:
self
.
logger
.
info
(
'Left directory %r as requested'
%
d
)
for
f
in
self
.
cleanup_file_list
:
if
os
.
path
.
exists
(
f
):
if
not
self
.
keep_on_error
:
self
.
logger
.
debug
(
'Cleanup file %r'
%
f
)
os
.
unlink
(
f
)
else
:
self
.
logger
.
info
(
'Left file %r as requested'
%
f
)
return
[
self
.
options
[
'location'
]]
...
...
@@ -346,6 +355,10 @@ class Script:
if
os
.
path
.
exists
(
d
):
self
.
logger
.
debug
(
'Cleanup directory %r'
%
d
)
shutil
.
rmtree
(
d
)
for
f
in
self
.
cleanup_file_list
:
if
os
.
path
.
exists
(
f
):
self
.
logger
.
debug
(
'Cleanup file %r'
%
f
)
os
.
unlink
(
f
)
def
applyPatchList
(
self
,
patch_string
,
patch_options
=
None
,
patch_binary
=
None
,
cwd
=
None
):
if
patch_string
is
not
None
:
...
...
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