Skip to content

Commit

Permalink
Use the same nevra format for history and regular transactions
Browse files Browse the repository at this point in the history
When serializing a history transaction package nevra use the same format
that is used when serializing base transaction.

It is also described in a comment: https://github.com/rpm-software-management/dnf5/blob/main/libdnf5/transaction/transaction_sr.hpp#L62
  • Loading branch information
kontura authored and pkratoch committed Jul 17, 2024
1 parent 1652f32 commit 5c76f5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libdnf5/transaction/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ std::string Transaction::serialize() {
for (const auto & pkg : get_packages()) {
PackageReplay package_replay;

package_replay.nevra = pkg.to_string();
// Use to_nevra_string in order to have nevra wihtout epoch if it is 0
package_replay.nevra = rpm::to_nevra_string(pkg);
package_replay.action = pkg.get_action();
package_replay.reason = pkg.get_reason();
package_replay.repo_id = pkg.get_repoid();
Expand Down

0 comments on commit 5c76f5e

Please sign in to comment.