Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
isaak yansane-sisk
slapos.buildout
Commits
cd35671d
Commit
cd35671d
authored
Sep 10, 2015
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add '--dry-run' option.
parent
d5deb01f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+19
-1
No files found.
src/zc/buildout/buildout.py
View file @
cd35671d
...
...
@@ -219,6 +219,7 @@ _buildout_default_options = _annotate_section({
'log-level'
:
'INFO'
,
'newest'
:
'true'
,
'offline'
:
'false'
,
'dry-run'
:
'false'
,
'parts-directory'
:
'parts'
,
'prefer-final'
:
'false'
,
'python'
:
'buildout'
,
...
...
@@ -328,6 +329,7 @@ class Buildout(UserDict.DictMixin):
self
.
_logger
=
logging
.
getLogger
(
'zc.buildout'
)
self
.
offline
=
(
buildout_section
[
'offline'
]
==
'true'
)
self
.
newest
=
(
buildout_section
[
'newest'
]
==
'true'
)
self
.
dry_run
=
(
buildout_section
[
'dry-run'
]
==
'true'
)
self
.
accept_buildout_test_releases
=
(
buildout_section
[
'accept-buildout-test-releases'
]
==
'true'
)
...
...
@@ -762,6 +764,8 @@ class Buildout(UserDict.DictMixin):
if
part
in
installed_parts
:
# update
__doing__
=
'Updating %s.'
,
part
self
.
_logger
.
info
(
*
__doing__
)
if
self
.
dry_run
:
continue
old_options
=
installed_part_options
[
part
]
old_installed_files
=
old_options
[
'__buildout_installed__'
]
...
...
@@ -787,6 +791,8 @@ class Buildout(UserDict.DictMixin):
else
:
# install
__doing__
=
'Installing %s.'
,
part
self
.
_logger
.
info
(
*
__doing__
)
if
self
.
dry_run
:
continue
installed_files
=
self
[
part
].
_call
(
recipe
.
install
)
if
installed_files
is
None
:
self
.
_logger
.
warning
(
...
...
@@ -806,7 +812,9 @@ class Buildout(UserDict.DictMixin):
finally
:
installed_path
=
self
[
'buildout'
][
'installed'
]
if
installed_parts
:
if
self
.
dry_run
:
pass
elif
installed_parts
:
new
=
StringIO
()
buildout
=
installed_part_options
[
'buildout'
]
buildout
[
'parts'
]
=
' '
.
join
(
installed_parts
)
...
...
@@ -842,6 +850,8 @@ class Buildout(UserDict.DictMixin):
# uninstall part
__doing__
=
'Uninstalling %s.'
,
part
self
.
_logger
.
info
(
*
__doing__
)
if
self
.
dry_run
:
return
# run uninstall recipe
recipe
,
entry
=
_recipe
(
installed_part_options
[
part
])
...
...
@@ -1979,6 +1989,12 @@ Options:
Squelch warnings about using an executable with a broken -S
implementation.
--dry-run
Dry-run mode. With this setting, buildout will display what will
be uninstalled and what will be installed without doing anything
in reality.
Assignments are of the form: section:option=value and are used to
provide configuration options that override those given in the
configuration file. For example, to run the buildout in offline mode,
...
...
@@ -2098,6 +2114,8 @@ def main(args=None):
print
'Setting socket time out to %d seconds'
%
timeout
socket
.
setdefaulttimeout
(
timeout
)
elif
orig_op
==
'--dry-run'
:
options
.
append
((
'buildout'
,
'dry-run'
,
'true'
))
elif
op
:
if
orig_op
==
'--help'
:
_help
()
...
...
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