Commit f3897999 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Xavier Thompson

[feat] Add '--skip-signature-check' option

parent c541897f
......@@ -111,6 +111,7 @@ with the later (right/bottom) configurations overriding earlier
b = 21
bin-directory = ...
c = 31
check-signature = true
d = 32
develop-eggs-directory = ...
......
......@@ -321,6 +321,7 @@ _buildout_default_options = _annotate_section({
'newest': 'true',
'offline': 'false',
'dry-run': 'false',
'check-signature': 'true',
'parts-directory': 'parts',
'prefer-final': 'true',
'python': 'buildout',
......@@ -505,6 +506,7 @@ class Buildout(DictMixin):
bool_option(buildout_section, 'newest')
)
self.dry_run = (buildout_section['dry-run'] == 'true')
self.check_signature = (buildout_section['check-signature'] == 'true')
##################################################################
## WARNING!!!
......@@ -816,6 +818,19 @@ class Buildout(DictMixin):
old_options = installed_part_options[part].copy()
installed_files = old_options.pop('__buildout_installed__')
new_options = self.get(part).copy()
if not self.check_signature:
old_signature = old_options.get(
'__buildout_signature__', None)
new_signature = new_options.get(
'__buildout_signature__', None)
if old_signature != new_signature:
self._logger.info(
'[%s]: __buildout_signature__ is different '
'but ignored.' % part)
if new_signature:
old_options['__buildout_signature__'] = new_signature
else:
del old_options['__buildout_signature__']
if old_options == new_options:
# The options are the same, but are all of the
# installed files still there? If not, we should
......@@ -2184,6 +2199,13 @@ Options:
be uninstalled and what will be installed without doing anything
in reality.
--skip-signature-check
Ignore __buildout_signature__ difference in comparing with the
previously installed state. Note that __buildout_signature__ is
updated with new dependencies by using this option.
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,
......@@ -2306,6 +2328,8 @@ def main(args=None):
elif orig_op == '--dry-run':
options.append(('buildout', 'dry-run', 'true'))
elif orig_op == '--skip-signature-check':
options.append(('buildout', 'check-signature', 'false'))
elif op:
if orig_op == '--help':
_help()
......
......@@ -818,6 +818,8 @@ the origin of the value (file name or ``COMPUTED_VALUE``, ``DEFAULT_VALUE``,
DEFAULT_VALUE
bin-directory= bin
DEFAULT_VALUE
check-signature= true
DEFAULT_VALUE
develop= recipes
buildout.cfg
develop-eggs-directory= develop-eggs
......@@ -906,6 +908,11 @@ You get more information about the way values are computed::
AS DEFAULT_VALUE
SET VALUE = bin
<BLANKLINE>
check-signature= true
<BLANKLINE>
AS DEFAULT_VALUE
SET VALUE = true
<BLANKLINE>
develop= recipes
<BLANKLINE>
IN buildout.cfg
......@@ -3024,6 +3031,7 @@ database is shown::
allow-picked-versions = true
allow-unknown-extras = false
bin-directory = /sample-buildout/bin
check-signature = true
develop-eggs-directory = /sample-buildout/develop-eggs
directory = /sample-buildout
dry-run = false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment