Skip to content

dnf.packages: make it work with dnf5 and handle multiple installation candidates#1655

Open
yacoob wants to merge 5 commits intopyinfra-dev:3.xfrom
yacoob:yacoob/rpm
Open

dnf.packages: make it work with dnf5 and handle multiple installation candidates#1655
yacoob wants to merge 5 commits intopyinfra-dev:3.xfrom
yacoob:yacoob/rpm

Conversation

@yacoob
Copy link
Copy Markdown
Contributor

@yacoob yacoob commented Apr 4, 2026

Fixes #1643.

  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts
  • Pull request includes documentation for any new/updated operations/facts
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)

yacoob added 3 commits April 4, 2026 16:28
This way it works on newer Fedora versions.

Tested this with `fedora:N` containers for N in [39, 43] :)
…didate pkg

...and one of them is already installed. This test fails right now, due to pyinfra-dev#1643.
Copy link
Copy Markdown
Member

@Fizzadar Fizzadar left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @yacoob. Looks good but breaks pacman group expansions which expect all packages to be installed for a given group. We could add an expand_match_any=False argument to ensure_packages and explicitly set True for yum/dnf.

Comment thread src/pyinfra/operations/util/packaging.py
Comment thread src/pyinfra/operations/util/packaging.py Outdated
Co-authored-by: Nick Mills-Barrett <nick@fizzadar.com>
Copy link
Copy Markdown
Contributor Author

@yacoob yacoob left a comment

Choose a reason for hiding this comment

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

PTAL? :)

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.

RpmPackageProvides fails to handle some virtual packages

2 participants