Bug 2216848

Summary: salt-minion pkg.* tasks fail if only dnf5 is present, not dnf
Product: [Fedora] Fedora Reporter: Gwyn Ciesla <gwync>
Component: saltAssignee: Kirill Ponomarev <kp>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: derek, dmurphy, gwync, kp, rcallicotte
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-24 17:34:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gwyn Ciesla 2023-06-22 20:03:59 UTC
Starting with Fedora 39, dnf is obsoleted by dnf5. The command line options are different, so a simple symlink won't work.

      ID: install_fedora_packages
Function: pkg.installed
  Result: False
 Comment: Error occurred installing package(s). Additional info follows:
          
          errors:
              - Unknown argument "--allowerasing" for command "dnf5". Add "--help" for more information about the arguments.
 Started: 19:45:43.710036
Duration: 1480.451 ms
 Changes:   

Reproducible: Always

Comment 1 Jaroslav Mracek 2023-06-23 07:29:43 UTC
Thank you very much for the report. The option `--allowerasing` is implemented, but it is defined under command not as general option.

`dnf5 install --allowerasing acpi` works but `dnf5 --allowerasing install acpi` does not.

The change is driven by not allowing options for command where they have no effect (dnf repoquery --allowerasing).

Do you have any suggestion what would be the best place how to document the change? My suggestion would be to document the change in https://dnf5.readthedocs.io/en/latest/changes.html.

Comment 2 Gwyn Ciesla 2023-06-23 14:40:57 UTC
That makes sense to me.

Comment 3 David Murphy 2023-06-26 20:25:40 UTC
Have a Salt issue addressing this https://github.com/saltstack/salt/issues/64532

Comment 4 David Murphy 2023-07-24 17:59:25 UTC
Fix for https://github.com/saltstack/salt/issues/64532 merged into the Salt master branch

Comment 5 Gwyn Ciesla 2023-07-24 18:03:09 UTC
Thank you!