in verbose mode, save .installed.cfg each time a part is installed.
Showing
-
Owner
I don't remember the exact reason for this change but the trigger can be debug mode instead of verbose mode, i.e. SlapOS will not invoke buildout with debug mode. What do you think ?
In debug mode, instead of verbose mode, save .installed.cfg each time a part is installed. diff --git a/src/zc/buildout/buildout.py b/src/zc/buildout/buildout.py index 84f9928..2b273fc 100644 --- a/src/zc/buildout/buildout.py +++ b/src/zc/buildout/buildout.py @@ -230,6 +230,7 @@ _buildout_default_options = _annotate_section({ 'log-level': 'INFO', 'newest': 'true', 'offline': 'false', + 'debug': 'false', 'dry-run': 'false', 'check-signature': 'true', 'parts-directory': 'parts', @@ -410,6 +411,7 @@ class Buildout(DictMixin): self.newest = ((not self.offline) and bool_option(buildout_section, 'newest') ) + self.debug = bool_option(buildout_section, 'debug') self.dry_run = (buildout_section['dry-run'] == 'true') self.check_signature = (buildout_section['check-signature'] == 'true') @@ -824,7 +826,7 @@ class Buildout(DictMixin): ' '.join(installed_parts)) _check_for_unused_options_in_section(self, part) - if self._log_level < logging.INFO: + if self.debug: self._save_installed_options() def _uninstall_part(self, part, installed_part_options): @@ -2171,6 +2173,7 @@ def main(args=None): options.append(('buildout', 'newest', 'false')) elif op[0] == 'D': debug = True + options.append(('buildout', 'debug', 'true')) else: _help() op = op[1:]
-
Owner
It's quite inconsistent to introduce
buildout:debug
but ignore it for thepost_mortem
part. Thedebug
variable should either become global (and nobuildout:debug
) or removed. -
Owner
According to @yusei , when
slapos node instance
runs buildout , thisself._log_level < logging.INFO
condition evaluate to false, so this is apparently not a problem in slapos node instance.In my test, if I run
./bin/buildout
, condition is true and I had to run./bin/buildout -q
for that condition to be false, but I have not checked how slapos runs buildout.
Please register or sign in to comment