Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransactionReplay: handle group package types #1569

Merged

Conversation

kontura
Copy link
Contributor

@kontura kontura commented Jul 1, 2024

This information is stored in system state for each group and is used during group upgrade.

@pkratoch
Copy link
Contributor

pkratoch commented Jul 3, 2024

Hi, can you please rebase? Not that there are merge requests, but in the commit 1090963 , libdnf5::transaction::GroupReplay objects are created without the new libdnf5::comps::PackageType attribute.

@kontura kontura force-pushed the replay-group-package-types branch from 82289e6 to db4b0a7 Compare July 3, 2024 12:16
@kontura
Copy link
Contributor Author

kontura commented Jul 3, 2024

Hi, can you please rebase? Not that there are merge requests, but in the commit 1090963 , libdnf5::transaction::GroupReplay objects are created without the new libdnf5::comps::PackageType attribute.

Thank you for catching that. 👍
Updated.

Copy link
Contributor

@pkratoch pkratoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably just a matter of personal preference, but I would find it more logical if the "." were in the original TransactionReplayErrors instead of adding it in the LogEvent::to_string, especially when I imagine that there could be a TransactionReplayError with multiple sentences as a message. That way, it would be well formatted on it's own. But I don't insist on this.

libdnf5/transaction/transaction_sr.cpp Outdated Show resolved Hide resolved
This information is stored in system state for each group and is used
during group upgrade.
The ending dot is added later when the string is formatted.
For example in `LogEvent::to_string()`.
@kontura kontura force-pushed the replay-group-package-types branch from db4b0a7 to 70ab999 Compare July 15, 2024 08:38
@kontura
Copy link
Contributor Author

kontura commented Jul 15, 2024

This is probably just a matter of personal preference, but I would find it more logical if the "." were in the original TransactionReplayErrors instead of adding it in the LogEvent::to_string, especially when I imagine that there could be a TransactionReplayError with multiple sentences as a message. That way, it would be well formatted on it's own. But I don't insist on this.

I don't have a strong preference here, I would be fine either way but it seems most exceptions in libdnf5 don't end with the . so I wanted to make it consistent.

This matches the dnf4 behavior.

It fixes confusing behavior where when a `group upgrade` is executed on a new
version of a group with new packages it installs only the new packages that
match the stored (in system state) package types but it also
overrided the package types with the currently configured `group_package_types`.
@kontura
Copy link
Contributor Author

kontura commented Jul 16, 2024

I have added one more commit that fixes a related problem with group upgrade and package types.

@pkratoch
Copy link
Contributor

Thank you!

@pkratoch pkratoch added this pull request to the merge queue Jul 16, 2024
Merged via the queue into rpm-software-management:main with commit 17860b6 Jul 16, 2024
12 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants