Skip to content

Fix unload plugins behavior without filelists#2047

Merged
kontura merged 1 commit intomasterfrom
jkolarik/fix-unload-removed-plugins-filelists
Feb 8, 2024
Merged

Fix unload plugins behavior without filelists#2047
kontura merged 1 commit intomasterfrom
jkolarik/fix-unload-removed-plugins-filelists

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.

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
# 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
@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