Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre_transaction_test() hook #2136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading