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
20925de4
Commit
20925de4
authored
Dec 06, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
download: drop 'mode' option
parent
051d8f09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
14 deletions
+5
-14
README.rst
README.rst
+0
-6
slapos/recipe/download.py
slapos/recipe/download.py
+5
-8
No files found.
README.rst
View file @
20925de4
...
...
@@ -354,12 +354,6 @@ URL as long as it's the last version, and this version is then moved to a
permanent place when a newer version is released: `url` shall be the final URL
and `alternate-url` the temporary one.
option: mode
------------
Octal (e.g. 644 for rw-r--r--), this option
allows to set mode of the downloaded file.
option: shared
--------------
...
...
slapos/recipe/download.py
View file @
20925de4
...
...
@@ -26,7 +26,7 @@
##############################################################################
import
errno
import
os
from
zc.buildout
import
download
from
zc.buildout
import
download
,
UserError
from
.
import
Shared
class
Recipe
(
object
):
...
...
@@ -38,11 +38,10 @@ class Recipe(object):
self
.
_url
=
options
[
'url'
]
self
.
_alternate
=
options
.
get
(
'alternate-url'
)
self
.
_md5sum
=
options
.
get
(
'md5sum'
)
or
None
self
.
_name
=
name
mode
=
options
.
get
(
'mode'
)
if
mode
is
not
None
:
mode
=
int
(
mode
,
8
)
self
.
_mode
=
mode
# 'mode' option was dropped; don't reimplement it
# an 'executable' boolean option may be acceptable
if
'mode'
in
options
:
raise
UserError
(
"option 'mode' not supported"
)
shared
=
Shared
(
buildout
,
name
,
options
)
if
not
self
.
_md5sum
:
...
...
@@ -77,8 +76,6 @@ class Recipe(object):
download
.
Download
(
self
.
_buildout
,
hash_name
=
True
)(
self
.
_url
,
self
.
_md5sum
,
self
.
_destination
,
**
({
'alternate_url'
:
alternate
}
if
alternate
else
{}))
if
self
.
_mode
is
not
None
:
os
.
chmod
(
self
.
_destination
,
self
.
_mode
)
def
update
(
self
):
if
not
self
.
_md5sum
:
...
...
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