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

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft

Commits on Sep 24, 2024

  1. Use the DNF5 API

    Use DNF5 in the Anaconda system installer for the package installation.
    poncovka authored and pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    cc78fb1 View commit details
    Browse the repository at this point in the history
  2. Use repo.get()

    poncovka authored and pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    e301b3b View commit details
    Browse the repository at this point in the history
  3. Change the DNFConfigWrapper to contain all necessary option getters a…

    …nd setters
    
    The option getters were renamed in dnf5 in commit:
    rpm-software-management/dnf5/commit/740fd279d283156b8e9c3525a16142f2fffda291
    So, with the previous approach, the names would have to be changed to
    `get_<name>_option` format, which would be wrong when they are used
    as atributes.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    0a30964 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    114b34c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de5137f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    adc1881 View commit details
    Browse the repository at this point in the history
  7. TEMPORARY: Load all repositories at once

    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.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    58a60bd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    31ac66e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5ab5f91 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b7f82fc View commit details
    Browse the repository at this point in the history
  11. Remove test for reset_substitution method

    The method was removed by commit:
    0ff5e44
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2de984e View commit details
    Browse the repository at this point in the history
  12. Remove variable loading, since it's done in base.setup()

    The test is adjusted because the base.setup() was already called. This
    might need to change if the place of calling base.setup() changes.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b164de0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    fde596e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    65fb4df View commit details
    Browse the repository at this point in the history
  15. TEMPORARY: Disable testing messages from resolving package selections

    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
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b3b9df1 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    810162d View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    523e7d1 View commit details
    Browse the repository at this point in the history
  18. TEMPORARY: Store comps queries

    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.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2b873e4 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    a1931a1 View commit details
    Browse the repository at this point in the history
  20. Enable comps tests

    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2dcfb90 View commit details
    Browse the repository at this point in the history
  21. Remove unused import

    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    c5e1424 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e48e21e View commit details
    Browse the repository at this point in the history
  23. Adapt test_module_payload_dnf_installation for dnf5

    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.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    223bba0 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    8dd5620 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    2112036 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    da8a3e9 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    4adf1dd View commit details
    Browse the repository at this point in the history
  28. Remove the test_dnf_tear_down

    The base is no longer being closed and the resetting of base is tested
    in test_module_payload_dnf5_manager.DNFManagerTestCase.test_reset_base.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    5b224cf View commit details
    Browse the repository at this point in the history
  29. Enable some tests in test_module_payload_dnf5_manager

    These tests probably didn't work at the time they were marked as
    skipped, but are working now.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8374596 View commit details
    Browse the repository at this point in the history
  30. Fix DownloadProgress callbacks

    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.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    a8195a9 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    0ed2da3 View commit details
    Browse the repository at this point in the history
  32. Report error when the dnf transaction fails

    The transaction can fail even if it doesn't contain any transaction
    items with an error status.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    26e2c02 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    80ce03f View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    25778ec View commit details
    Browse the repository at this point in the history
  35. Fix transaction callbacks

    The transaction callbacks take libdnf5::base::TransactionPackage, not
    libdnf5::transaction::Package.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8cb2c3c View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    946ab77 View commit details
    Browse the repository at this point in the history
  37. Don't close the multiprocessing queue too soon

    The transaction_stop is actually for RPMCALLBACK_TRANS_STOP from rpm,
    which is only the end of preparation phase. The after_complete is called
    by dnf after the whole transaction completes.
    
    Also, the queue cannot be closed at this point, because transaction
    errors are written there after the transaction completes and then
    TransactionProgress.quit is called, which closes the queue as well.
    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    90ca8a4 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    54457f7 View commit details
    Browse the repository at this point in the history
  39. Set the destdir option

    pkratoch committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    fca17eb View commit details
    Browse the repository at this point in the history