Skip to content

Commit

Permalink
Add pre_transaction_test() hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Mig Novotny committed Sep 30, 2024
1 parent d50a6b2 commit 6a0466b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dnf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ def do_transaction(self, display=()):

logger.info(_('Transaction check succeeded.'))

self._plugins.run_pre_transaction_test()

timer = dnf.logging.Timer('transaction test')
logger.info(_('Running transaction test'))

Expand Down
7 changes: 7 additions & 0 deletions dnf/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def pre_transaction(self):
# :api
pass

def pre_transaction_test(self):
# :api
pass

def transaction(self):
# :api
pass
Expand Down Expand Up @@ -161,6 +165,9 @@ def run_sack(self):
def run_resolved(self):
self._caller('resolved')

def run_pre_transaction_test(self):
self._caller('pre_transaction_test')

def run_pre_transaction(self):
self._caller('pre_transaction')

Expand Down

0 comments on commit 6a0466b

Please sign in to comment.