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

DNF5 prototype #5847

Closed
wants to merge 35 commits into from
Closed

DNF5 prototype #5847

wants to merge 35 commits into from

Conversation

pkratoch
Copy link
Contributor

No description provided.

poncovka and others added 30 commits August 22, 2024 13:48
Use DNF5 in the Anaconda system installer for the package installation.
The option getters were renamed in dnf5 in commit:
rpm-software-management/dnf5/commit/740fd279d283156b8e9c3525a16142f2fffda291

There is also another option and that is to change the DNFConfigWrapper.
However, this class is described as a temporary wrapper, so further
investigation will be needed around this. For now, renaming the options
seems sufficient.
The dnf5 methods `Repo::fetch_metadata` and `Repo::load` were both
removed from API. See:
rpm-software-management/dnf5/commit/cc2ae250c30bdbd8fadb99a4eb9d817b074dc6b2
rpm-software-management/dnf5/commit/b2ece236b62d121c4e2ddd91272804db17ee7d12

Instead use `RepoSack::load_repos` to load all repositories. This method
must be called only once.
The method was removed by commit:
0ff5e44
The test is adjusted because the base.setup() was already called. This
might need to change if the place of calling base.setup() changes.
There was a change regarding creation of the `ValidationReport`. It's
no longer created in `CheckPackagesSelectionTask._resolve_selection()`
but in `DNFManager.resolve_selection()`. The change lookgs good and it
was probably even necessary because of changes in dnf reports from the
transaction resolving, but it prevents testing the report messages,
because the report is now also mocked.

Since it's not a critical problem, I am disabling the message checks
for now.

The changes that caused the issue:
poncovka@faccc47#diff-08489d103d5780dd5279cb390820b5eeb83963642783cd82773cef081803b1b7L620-L641
poncovka@faccc47#diff-57dffd56427be4eca900ee75e0a130414fb51527d206b00116ef9501f0784127L96-L114
The comps objects are owned by the queries, so when a query is destroyed,
so are the contained objects. There is a bug for dnf:
rpm-software-management/dnf5#1530
This is a temporary workaround.
The ValidationReport is now created within the mocked
DNFManager.resolve_selection, so it must be mocked as well.
Also, there are no longer exceptions raised from the DNF transaction,
instead, the problems are stored in a report, so there are no
exceptions to mock.
The base is no longer being closed and the resetting of base is tested
in test_module_payload_dnf5_manager.DNFManagerTestCase.test_reset_base.
These tests probably didn't work at the time they were marked as
skipped, but are working now.
Type 'void *' is expected as return from `add_new_download` and as
`user_data` and `used_cb_data` arguments, so it cannot be easily used
in Python. This is a workaround that fixes a segmentation fault, but
a better solution is still needed.
@pep8speaks
Copy link

Hello @pkratoch! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 572:9: E265 block comment should start with '# '
Line 588:9: E265 block comment should start with '# '
Line 845:13: E265 block comment should start with '# '

Line 283:43: W292 no newline at end of file

Line 119:5: E303 too many blank lines (2)
Line 146:100: E501 line too long (100 > 99 characters)
Line 158:100: E501 line too long (100 > 99 characters)
Line 173:100: E501 line too long (100 > 99 characters)

Line 511:100: E501 line too long (120 > 99 characters)
Line 515:100: E501 line too long (125 > 99 characters)
Line 561:1: E302 expected 2 blank lines, found 1
Line 612:1: E302 expected 2 blank lines, found 1

Line 31:1: E265 block comment should start with '# '
Line 32:1: E265 block comment should start with '# '
Line 33:1: E265 block comment should start with '# '
Line 34:1: E265 block comment should start with '# '
Line 35:1: E265 block comment should start with '# '
Line 36:1: E265 block comment should start with '# '
Line 37:1: E265 block comment should start with '# '

@github-actions github-actions bot added the f41 label Aug 22, 2024
@pkratoch pkratoch closed this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants