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

Fix unload plugins behavior without filelists #2047

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

jan-kolarik
Copy link
Member

@jan-kolarik jan-kolarik commented Feb 7, 2024

For packages originating outside the System repository, we don't populate the pkg.files when running without filelists metadata. Use RPM database as a source instead.

This fixes the CI failing scenario "Moving plugin between subpackages is not considered removal of plugin" which broke due to changes introduced in rpm-software-management/libdnf#1642.

Related:

@jan-kolarik jan-kolarik requested a review from m-blaha February 7, 2024 09:45
@jan-kolarik jan-kolarik force-pushed the jkolarik/fix-unload-removed-plugins-filelists branch 2 times, most recently from 041e9be to 8db6d2e Compare February 7, 2024 10:51
@jan-kolarik
Copy link
Member Author

Sorry for the force pushes, it is now ready for the review.

dnf/plugin.py Outdated Show resolved Hide resolved
For packages originating outside the System repository, we don't populate the `pkg.files` when running without filelists metadata. Use RPM database as a source instead.
@jan-kolarik jan-kolarik force-pushed the jkolarik/fix-unload-removed-plugins-filelists branch from 8db6d2e to c158f80 Compare February 8, 2024 11:30
@@ -193,7 +194,7 @@ def unload_removed_plugins(self, transaction):

# check whether removed plugin file is added at the same time (upgrade of a plugin)
for pkg in transaction.install_set:
erased_plugin_files.difference_update(pkg.files)
erased_plugin_files.difference_update(pkg._header[rpm.RPMTAG_FILENAMES])
Copy link
Member Author

Choose a reason for hiding this comment

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

I believe that here we are with the rpm transaction completed, so the header should be always present, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think so as well, thanks. 🙂

@kontura kontura merged commit ced5120 into master Feb 8, 2024
3 of 6 checks passed
@kontura kontura deleted the jkolarik/fix-unload-removed-plugins-filelists branch February 8, 2024 12:07
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.

2 participants