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

rpm::Transaction: Enable installonly pkg downgrade #723

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

m-blaha
Copy link
Member

@m-blaha m-blaha commented Jul 14, 2023

To correctly filter out the
"package kernel-x (which is newer than kernel-y) is already installed"
RPM transaction problem, we need to determine whether a downgrade
operation is present in the transaction.

The current implementation relies on the presence of a "downgrade"
operation in the solver results. However, for install-only packages,
there is no "downgrade" operation; only an "install" operation.

This patch introduces detection to identify if an install-only package
of an older version is present in the transaction. It then sets ignored
problems in the RPM transaction accordingly.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2221308
Resolves: #720

Tests: rpm-software-management/ci-dnf-stack#1337

To correctly filter out the
"package kernel-x (which is newer than kernel-y) is already installed"
RPM transaction problem, we need to determine whether a downgrade
operation is present in the transaction.

The current implementation relies on the presence of a "downgrade"
operation in the solver results. However, for install-only packages,
there is no "downgrade" operation; only an "install" operation.

This patch introduces detection to identify if an install-only package
of an older version is present in the transaction. It then sets ignored
problems in the RPM transaction accordingly.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2221308
Resolves: #720
Copy link
Member

@Conan-Kudo Conan-Kudo left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me.

@kontura kontura added this pull request to the merge queue Jul 18, 2023
Merged via the queue into main with commit 38e8dde Jul 18, 2023
@kontura kontura deleted the mblaha/kernel-downgrade branch July 18, 2023 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

dnf5 will not install an older kernel
3 participants