Bug 1192741 - [api] Plugin callback request: pre_transaction
Summary: [api] Plugin callback request: pre_transaction
Keywords:
Status: CLOSED DUPLICATE of bug 1173542
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-14 21:53 UTC by Daniel Miranda
Modified: 2015-02-16 12:52 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-16 12:52:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Miranda 2015-02-14 21:53:39 UTC
Right now the plugin API provides two main callbacks for the transaction flow, resolved() and transaction(). Unfortunately, there are cases where they are not enough. I was looking into improving the snapper plugin so that it takes properly labelled snapshots before and after a transaction runs, but resolved() runs before the user is prompted for confirmation, and therefore is not a good place to take the snapshot.

I would like if a pre_transaction() hook existed that fired right after the transaction is already confirmed but before it is executed. So the flow would end up like this:

- dnf starts, processes command line, resolves deps
- resolve() is called
- user is prompted for confirmation, transaction integrity is verified
- pre_transaction() is called
- transaction is run
- transaction() is called

Comment 1 Radek Holy 2015-02-16 12:52:19 UTC
Hello, thank you for the report. This is a duplicate of bug 1173542 (including the use case :) ).

*** This bug has been marked as a duplicate of bug 1173542 ***


Note You need to log in before you can comment on or make changes to this bug.