Skip to content

Dnf5 cleanup - #135

Merged
bhoy-troy merged 3 commits into
fedora-eln:masterfrom
bhoy-troy:dnf5-cleanup
Sep 11, 2026
Merged

bhoy-troy merged 3 commits into
fedora-eln:masterfrom
bhoy-troy:dnf5-cleanup

Conversation

@bhoy-troy

Copy link
Copy Markdown
Collaborator

Migrate Content Resolver from DNF4 (python3-dnf) to DNF5 (python3-libdnf5), restore the package relationship analysis needed for runtime dependency reporting, and fix wildcard package name resolution under DNF5’s stricter query semantics.

Steps

  • Reapply "DNF4 to DNF5" (46c6a30) — Core migration across the resolver engine, supporting modules, Docker image, CI workflows, and README.
  • Implement DNF5 package relationship analysis (c5960dd) — Rebuilds requires/recommends/supplements reverse-dependency maps using a provides index.
  • Handle resolving wildcard package names (b155c4d) — Uses QueryCmp_GLOB for filter_name() and filter_provides() when package names contain wildcard characters.

Key changes

DNF5 migration
  • Replace python3-dnf with libdnf5 APIs (Base, Goal, PackageQuery, RepoQuery, DNF5 exception types).
  • Add is_package_resolvable() to check packages by name or provides before adding them to a goal.
  • Improve transaction error handling and classification (e.g. “nothing provides”, multi-version conflicts).
  • Update config_manager.py, historia_data.py, page_generation.py, and utils.py for DNF5 compatibility and cleaner output naming.
Package relationship analysis
  • Add _analyze_package_relations() and _resolve_dep_names() to build a provides index and populate reverse dependency maps from requires, recommends, and supplements.
  • Restore runtime dependency tracking in view statistics.
Wildcard resolution
  • DNF5 defaults to exact matching; wildcard package names now explicitly use QueryCmp_GLOB for name and provides queries.

This reverts commit fb79403.
Use QueryCmp_GLOB for filter_name and filter_provides() when the package name contains wildcard chars
@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b538d958-a137-43bb-bc92-238f7b3b6a5a


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bhoy-troy

Copy link
Copy Markdown
Collaborator Author

@yselkowitz , would you mind reviewing these changes when you get a chance?

@bhoy-troy
bhoy-troy marked this pull request as ready for review September 8, 2026 15:44

@yselkowitz yselkowitz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Based on the results of the staging instance, this seems to fix the issues that forced the early revert.

Is there any other testing we can do to compare the output between the current code and this?

@bhoy-troy

Copy link
Copy Markdown
Collaborator Author

I have a script that I use to do comparisons, but other than that I have been watching it for the last week or more

@bhoy-troy
bhoy-troy merged commit 87c2ca4 into fedora-eln:master Sep 11, 2026
3 checks passed
@bhoy-troy
bhoy-troy deleted the dnf5-cleanup branch September 11, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wildcards are not being resolved Runtime dependencies are being counted but not shown Port CR from python3-dnf to python3-libdnf5

2 participants