Browse Source

Abort when do_all fails without transaction to rollback

When do_all fails, and there is no transaction to rollback, we will probably
leave a broken state behind. This codepath probably isn't triggered unless
something else is broken.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
devuan-deployment
Ivo De Decker 1 year ago
parent
commit
4defca4cc1
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      britney.py

+ 4
- 1
britney.py View File

@@ -1098,7 +1098,10 @@ class Britney(object):
else:
output_logger.info("FAILED\n")
if not transaction:
return
# if we 'FAILED', but we cannot rollback, we will probably
# leave a broken state behind
# this should not happen
raise AssertionError("do_all FAILED but no transaction to rollback")
transaction.rollback()
if self.options.check_consistency_level >= 2:
target_suite.check_suite_source_pkg_consistency('do_all after rollback')


Loading…
Cancel
Save