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
313184b6
Commit
313184b6
authored
Apr 15, 2020
by
Julien Muchembled
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default: only set default 'location' option if there's an install script
parent
90a2ee51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
slapos/recipe/build/__init__.py
slapos/recipe/build/__init__.py
+9
-10
No files found.
slapos/recipe/build/__init__.py
View file @
313184b6
...
...
@@ -227,11 +227,6 @@ class Script(EnvironMixin):
self
.
buildout
=
buildout
self
.
name
=
name
self
.
logger
=
logging
.
getLogger
(
'SlapOS build of %s'
%
self
.
name
)
try
:
self
.
options
[
'location'
]
=
self
.
options
[
'location'
].
strip
()
except
KeyError
:
self
.
options
[
'location'
]
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'parts-directory'
],
self
.
name
)
missing
=
True
keys
=
'init'
,
'install'
,
'update'
for
option
in
keys
:
...
...
@@ -247,17 +242,21 @@ class Script(EnvironMixin):
self
.
keep_on_error
=
True
else
:
self
.
keep_on_error
=
False
if
self
.
_install
and
'location'
not
in
options
:
options
[
'location'
]
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'parts-directory'
],
self
.
name
)
EnvironMixin
.
__init__
(
self
,
False
)
if
self
.
_init
:
self
.
_exec
(
self
.
_init
)
def
_exec
(
self
,
script
):
options
=
self
.
options
exec
(
script
,
dict
(
GLOBALS
,
self
=
self
,
options
=
options
,
location
=
options
[
'location'
],
))
g
=
dict
(
GLOBALS
,
self
=
self
,
options
=
options
)
try
:
g
[
'location'
]
=
options
[
'location'
]
except
KeyError
:
pass
exec
(
script
,
g
)
def
install
(
self
):
if
not
self
.
_install
:
...
...
Julien Muchembled
@jm
mentioned in merge request
slapos!720 (merged)
·
Apr 15, 2020
mentioned in merge request
slapos!720 (merged)
mentioned in merge request slapos!720
Toggle commit list
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