Skip to content

fix(v2): use dnf -q list --installed for accurate package detection#5219

Draft
leaanthony wants to merge 1 commit into
masterfrom
fix/4457-dnf-detection
Draft

fix(v2): use dnf -q list --installed for accurate package detection#5219
leaanthony wants to merge 1 commit into
masterfrom
fix/4457-dnf-detection

Conversation

@leaanthony

Copy link
Copy Markdown
Member

Summary

  • Replaces dnf info installed <pkg> with dnf -q list --installed <pkg> in the dnf package manager
  • The previous command returned available packages with version info even when not installed, causing wails doctor to falsely report packages as installed on Fedora/RHEL
  • The new command returns exit code 1 when a package is not installed, providing accurate detection

Test plan

  • New tests in v2/test/4457/dnf_test.go using mock dnf scripts verify:
    1. Exit code 1 (not installed) → PackageInstalled returns false
    2. Exit code 0 with installed output → PackageInstalled returns true
    3. The new approach correctly rejects packages that the old approach would falsely detect

Fixes #4457

The previous 'dnf info installed' command returns available packages
(with Version info) even when the package is not installed, causing
wails doctor to falsely report packages as installed on Fedora/RHEL.

Use 'dnf -q list --installed' instead, which properly returns exit
code 1 when a package is not installed.

Fixes #4457
@coderabbitai

coderabbitai Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46b5607f-14c1-4dc7-af15-47b28819d569

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/4457-dnf-detection

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 and usage tips.

@leaanthony

Copy link
Copy Markdown
Member Author

🤖 PR Triage Review

Accepted

Uses dnf -q list --installed for accurate package detection (v2 Linux). Fixes RPM-based distro support.

Platform: Linux (v2)

Next Steps: Dispatching for Linux testing.


Reviewed by Wails PR Reviewer Bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wails doctor falsely reports libwebkit | webkit2gtk4.0-devel installed on Fedora 41

1 participant