Skip to content

Move config-manager plugin installation to the package manager abstraction layer #4847

@thrix-bot

Description

@thrix-bot

Both epel and crb feature plugins independently install dnf-command(config-manager) via direct guest.package_manager.install(Package(...)) calls. This duplicates version-specific logic and doesn't follow the existing abstraction pattern established by copr_plugin / enable_copr().

Current state

  • epel.py has a private _install_config_manager() method that branches on version (yum-utils for v7, dnf-command(config-manager) for v8+)
  • crb.py directly calls guest.package_manager.install(Package("dnf-command(config-manager)"))
  • No shared abstraction exists for this common operation

Proposed change

Follow the copr_plugin pattern:

  1. Add config_manager_plugin ClassVar to DNF package manager classes (Dnf, Dnf5, Yum) with appropriate virtual provides
  2. Add install_config_manager() method to PackageManager base class (raises PrepareError for unsupported managers)
  3. Implement install_config_manager() in Dnf class (inherited by Dnf5 and Yum)
  4. Replace direct install calls in epel.py and crb.py with guest.package_manager.install_config_manager()

References

Metadata

Metadata

Assignees

Labels

area | maintenanceChanges important for efficiency and the long-term health of the project

Type

Projects

Status

review

Status

triaged

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions