Bug 1173542 - [RFE] [API] split transaction to before/after-transaction
Summary: [RFE] [API] split transaction to before/after-transaction
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Jaroslav Rohel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1192741 (view as bug list)
Depends On:
Blocks: 1248806
TreeView+ depends on / blocked
 
Reported: 2014-12-12 11:53 UTC by Igor Gnatenko
Modified: 2017-07-03 09:15 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-06-14 14:46:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Igor Gnatenko 2014-12-12 11:53:58 UTC
Now I'm working on writing DNF plugin for snapper (http://snapper.io/)

It will create snapshot before transaction (pre-snapshot) and after finished transaction (post-snapshot).

In this case I can't use resolved() stage for pre-snapshot.

Comment 1 Honza Silhan 2014-12-19 16:38:37 UTC
We can do this. I'd rather collect all request from plugin developers first, then rename some current hooks to make more sense (transaction -> transaction_end, ...) with new ones added. In the meantime you can wastefully save snapshots in `resolved` hook.

Comment 2 Radek Holy 2014-12-19 19:02:27 UTC
FTR, the use case is that the plugin wants to create the snapshot only if it's already clear that the transaction will be performed. I.e. after the user's confirmation.

Comment 3 Radek Holy 2015-02-16 12:52:20 UTC
*** Bug 1192741 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Miranda 2015-09-19 11:55:43 UTC
Any new info/decision about this request? I've recently hit a case with the snapper plugin where I lost files after having to revert to a previous snapshot, because it was from the previous packaging operation some days ago. I had to extract files manually from the snapshots, which is never pleasant.

Having the ability to take snapshots immediately before and after a transaction would be really helpful.

Comment 5 Fedora Admin XMLRPC Client 2016-07-08 09:25:21 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Jaroslav Mracek 2017-04-20 17:25:52 UTC
Please Igor, can you re-evaluate the request. Or can you try to implement it according to your needs? Thanks a lot.

Comment 7 Jaroslav Rohel 2017-05-19 09:50:05 UTC
New pre_transaction hook for plugins in PR https://github.com/rpm-software-management/dnf/pull/818
This hook is called just before the transaction execution.

Comment 8 Jaroslav Mracek 2017-06-14 14:46:25 UTC
The patch was released in dnf-2.5.1-1 into rawhide and Fc26.


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