Skip to content

improve check command and solver problem reporting#577

Open
oliverkurth wants to merge 2 commits into
devfrom
topic/okurth/improve-check-command
Open

improve check command and solver problem reporting#577
oliverkurth wants to merge 2 commits into
devfrom
topic/okurth/improve-check-command

Conversation

@oliverkurth
Copy link
Copy Markdown
Contributor

@oliverkurth oliverkurth commented May 22, 2026

Summary

This PR improves tdnf's solver problem reporting to provide full dependency chains for conflicts, making it significantly easier to debug broken dependencies.

Previously, tdnf used solver_findproblemrule which only surfaced the "leaf" problem (e.g., package expect is disabled or conflicting requests), omitting the context of which package actually required it.

Changes Included:

  • Enhanced Rule Tracing: Updated SolvReportProblems to use solver_findallproblemrules, traversing and printing the entire chain of dependency rules that lead to a solver failure.
  • Verbose Gating: To prevent overly noisy output, the detailed solver traces are gated behind the --verbose flag. Standard output prints the original leaf error alongside a hint: Please retry with --verbose to see detailed solver rules.
  • Fixed --skipconflicts Behavior: Addressed an issue where purely conflict-based rules were hidden, but the root install job rule remained, causing unexplainable conflicting requests output. The entire problem block is now correctly suppressed if it is fundamentally a conflict problem.
  • Tests: Added pytest coverage in test_install.py to verify the fallback error hint and the detailed reporting behavior.

Example

$ tdnf check --releasever=5.0 --installroot=$(pwd)/installroot
1. package photon-os-installer-2.8-1.ph5.x86_64 requires mkpasswd, but none of the providers can be installed
...
Found 22 problem(s) while resolving
Please retry with --verbose to see detailed solver rules
Error(1301) : Solv general runtime error
$ tdnf check --releasever=5.0 --installroot=$(pwd)/installroot -v
Problem 1:
  - package mkpasswd-5.5.15-2.ph5.x86_64 conflicts with expect provided by expect-5.45.4-4.ph5.x86_64
  - package photon-os-installer-2.8-1.ph5.x86_64 requires mkpasswd, but none of the providers can be installed
  - package dejagnu-1.6.2-3.ph5.noarch requires expect, but none of the providers can be installed
  - job install photon-os-installer-2.8-1.ph5.x86_64 conflicts with other jobs
  - job install dejagnu-1.6.2-3.ph5.noarch conflicts with other jobs

Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
Signed-off-by: Oliver Kurth <oliver.kurth@broadcom.com>
@oliverkurth oliverkurth force-pushed the topic/okurth/improve-check-command branch from 7dbb1d2 to 6908d55 Compare May 22, 2026 20:04
@oliverkurth oliverkurth requested a review from sshedi May 22, 2026 20:07
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.

2 participants