mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Following previous regenconf fixes, the regen-conf was now outputing a whole lot of 'forget-about-it' when e.g. running regen-conf for nginx because of files flagged as 'should-not-exists'... so this is a dirty workaround
This commit is contained in:
parent
84d325495b
commit
b970cba6c4
1 changed files with 5 additions and 2 deletions
|
@ -236,6 +236,8 @@ def regen_conf(operation_logger, names=[], with_diff=False, force=False, dry_run
|
|||
conf_files[f] = None
|
||||
# </> End discussion about stale file hashes
|
||||
|
||||
force_update_hashes_for_this_category = False
|
||||
|
||||
for system_path, pending_path in conf_files.items():
|
||||
logger.debug("processing pending conf '%s' to system conf '%s'",
|
||||
pending_path, system_path)
|
||||
|
@ -284,7 +286,8 @@ def regen_conf(operation_logger, names=[], with_diff=False, force=False, dry_run
|
|||
os.remove(pending_path)
|
||||
conf_hashes[system_path] = None
|
||||
conf_status = 'forget-about-it'
|
||||
regenerated = True
|
||||
force_update_hashes_for_this_category = True
|
||||
continue
|
||||
elif not saved_hash or force:
|
||||
if force:
|
||||
logger.debug("> system conf has been manually removed")
|
||||
|
@ -377,7 +380,7 @@ def regen_conf(operation_logger, names=[], with_diff=False, force=False, dry_run
|
|||
else:
|
||||
logger.success(m18n.n('regenconf_would_be_updated', category=category))
|
||||
|
||||
if succeed_regen and not dry_run:
|
||||
if (succeed_regen or force_update_hashes_for_this_category) and not dry_run:
|
||||
_update_conf_hashes(category, conf_hashes)
|
||||
|
||||
# Append the category results
|
||||
|
|
Loading…
Add table
Reference in a new issue