dnf5 icon indicating copy to clipboard operation
dnf5 copied to clipboard

Transaction Store and Load API

Open kontura opened this issue 1 year ago • 5 comments

Operations such as System Upgrade, Offline Upgrade, History Replay, History Redo, History Store and others require an API for storing and loading transactions.

  • [x] Add an API to store (serialize) a transaction into a JSON data format. We will need to be able to serialize both base::transaction and transaction::transaction (history transaction).
  • [x] Add API to load the JSON serialized transaction into a Goal.

The first part is done but we still need:

  • [x] Fix environments handling - requires ABI break
  • [x] Add groups/environments replaying without loaded repos
  • [ ] Verify functionality without loading repos
  • [ ] Enable/Add CI tests
  • [ ] Integrate running without loading repos into offline command (system-upgrade)

The API should support packages (RPMs), groups, environments and potentially also modules.

kontura avatar Nov 06 '23 14:11 kontura

The first draft of the API is in PR: https://github.com/rpm-software-management/dnf5/pull/978

kontura avatar Nov 06 '23 14:11 kontura

Second draft of the API is PR https://github.com/rpm-software-management/dnf5/pull/1005

evan-goode avatar Nov 28 '23 18:11 evan-goode

Related issue to the mentioned ABI break: https://github.com/rpm-software-management/dnf5/issues/1025.

jan-kolarik avatar Dec 11 '23 09:12 jan-kolarik

Comps and running without loading repos PR: https://github.com/rpm-software-management/dnf5/pull/1264

kontura avatar Feb 22 '24 10:02 kontura

Make sure these scenarios are covered:

  • https://github.com/rpm-software-management/dnf/issues/2031
  • https://issues.redhat.com/browse/RHEL-17494

Related PR in libdnf:

  • https://github.com/rpm-software-management/libdnf/pull/1644.

jan-kolarik avatar Feb 27 '24 10:02 jan-kolarik

The API is finished.

kontura avatar Jul 23 '24 07:07 kontura