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
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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
Show 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
...
@@ -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
permanent place when a newer version is released: `url` shall be the final URL
and `alternate-url` the temporary one.
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
option: shared
--------------
--------------
...
...
slapos/recipe/download.py
View file @
20925de4
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
##############################################################################
##############################################################################
import
errno
import
errno
import
os
import
os
from
zc.buildout
import
download
from
zc.buildout
import
download
,
UserError
from
.
import
Shared
from
.
import
Shared
class
Recipe
(
object
):
class
Recipe
(
object
):
...
@@ -38,11 +38,10 @@ class Recipe(object):
...
@@ -38,11 +38,10 @@ class Recipe(object):
self
.
_url
=
options
[
'url'
]
self
.
_url
=
options
[
'url'
]
self
.
_alternate
=
options
.
get
(
'alternate-url'
)
self
.
_alternate
=
options
.
get
(
'alternate-url'
)
self
.
_md5sum
=
options
.
get
(
'md5sum'
)
or
None
self
.
_md5sum
=
options
.
get
(
'md5sum'
)
or
None
self
.
_name
=
name
# 'mode' option was dropped; don't reimplement it
mode
=
options
.
get
(
'mode'
)
# an 'executable' boolean option may be acceptable
if
mode
is
not
None
:
if
'mode'
in
options
:
mode
=
int
(
mode
,
8
)
raise
UserError
(
"option 'mode' not supported"
)
self
.
_mode
=
mode
shared
=
Shared
(
buildout
,
name
,
options
)
shared
=
Shared
(
buildout
,
name
,
options
)
if
not
self
.
_md5sum
:
if
not
self
.
_md5sum
:
...
@@ -77,8 +76,6 @@ class Recipe(object):
...
@@ -77,8 +76,6 @@ class Recipe(object):
download
.
Download
(
self
.
_buildout
,
hash_name
=
True
)(
download
.
Download
(
self
.
_buildout
,
hash_name
=
True
)(
self
.
_url
,
self
.
_md5sum
,
self
.
_destination
,
self
.
_url
,
self
.
_md5sum
,
self
.
_destination
,
**
({
'alternate_url'
:
alternate
}
if
alternate
else
{}))
**
({
'alternate_url'
:
alternate
}
if
alternate
else
{}))
if
self
.
_mode
is
not
None
:
os
.
chmod
(
self
.
_destination
,
self
.
_mode
)
def
update
(
self
):
def
update
(
self
):
if
not
self
.
_md5sum
:
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