Bug 2292652

Summary: yq command should support alternatives
Product: [Fedora] Fedora Reporter: Petr Menšík <pemensik>
Component: yqAssignee: Michel Lind <michel>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: go-sig, michel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://bugzilla.redhat.com/show_bug.cgi?id=2263790
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-08-29 18:10: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:
Bug Depends On: 2263790    
Bug Blocks:    

Description Petr Menšík 2024-06-17 13:01:03 UTC
There are two concurrent projects offering yq tool with roughly the same functionality. At least they provide common interface, which can be used with both such tools.

https://pypi.org/project/yq/ seems to be older variant used for the same thing. While it seems less polished, it seems to have more functionality.

According to packaging guidelines, compatible commands should use alternatives
- https://docs.fedoraproject.org/en-US/packaging-guidelines/Conflicts/#_binary_name_conflicts

Those projects both behave similarly in basic usage, so I think they should recommend. I have made python3-yq package non-conflicting with yq, but python3-yq-alt to provide alternative name. I think yq component should also provide alternative name

Reproducible: Always

Steps to Reproduce:
1. sudo dnf install yq
2. sudo dnf install python3-yq-alt from bug #2263790
3.
Actual Results:  
They conflict hard.

$ LANG=en_US.UTF-8 sudo dnf install results_python-yq/3.4.3/12.fc39/python3-yq{,-alt}-3.4.3-12.fc39.noarch.rpm 
Last metadata expiration check: 0:00:30 ago on Mon 17 Jun 2024 02:56:02 PM CEST.
Error: 
 Problem: problem with installed package yq-4.43.1-2.fc39.x86_64
  - package python3-yq-alt-3.4.3-12.fc39.noarch from @commandline conflicts with yq provided by yq-4.43.1-2.fc39.x86_64 from @System
  - package python3-yq-alt-3.4.3-12.fc39.noarch from @commandline conflicts with yq provided by yq-4.43.1-2.fc39.x86_64 from updates
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)


Expected Results:  
Both can be installed while both can be preferred variant for yq name. Non-default tool should be available under alternative name.

Check review bug #2263790.

Comment 1 Aoife Moloney 2025-02-26 13:04:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Petr Menšík 2025-08-29 18:10:34 UTC
Okay, cancelled alternatives usage, those command are not similar enough. While they are similar, differences are not small enough.