Description of problem: I want to make a passive plugin for DNF that auto-hooks into install/remove/upgrade/distro-sync/etc. to retarget a transaction from the running system into a writable snapshot made using Btrfs. This technique is one of the core functions of openSUSE's transactional-update[1] tool, but it's a lot more complicated because it's orchestrating Zypper instead of hooking into it. Ultimately, I want to write a passive plugin that kicks in after successful resolution and after the user has said yes to the transaction, but before it starts the actual transaction. In the space between user acceptance and acting on the transaction, I want to create a new writable snapshot subvolume and tell DNF to change the current proposed transaction's target from the running system to the subvolume containing the writable snapshot. This subvolume snapshot might be created by Snapper, or by hand, or with some other mechanism, but whatever the process, I'd like to only proceed after the snapshot is successfully created and the transaction has been retargeted. Then after the successful transaction, I'd create a new boot to snapshot menu entry for the old state after switching the default subvolume to boot from. [1]: https://github.com/openSUSE/transactional-update Version-Release number of selected component (if applicable): 2.7.5-12.fc28
This actually works now in libdnf, and I've implemented the txnupd plugin as proof: https://code.opensuse.org/microos/libdnf-plugin-txnupd I'm not sure if this is possible yet at the dnf level, though.
Have you tried to use action plugin in DNF5?
(In reply to Jaroslav Mracek from comment #2) > Have you tried to use action plugin in DNF5? Not yet. It's on my todo list, though.