I have a Virtual Package that has this in the rpm.spec:
Name: own-package
Requires: own-package-bin
Then I have a package for rhel7 with these lines in the rpm.spec:
Summary: own-package-rhel7
Name: own-package-rhel7
Requires: scl-utils, rh-python38
Conflicts: own-package-rhel8
Provides: own-package-bin
And this package for rhel8:
Summary: own-package-rhel8
Name: own-package-rhel8
Requires: python38
Provides: own-package-bin
Conflicts: own-package-rhel7
The own-package-rhel7 and own-package-rhel8 both work when installed manually by their name on the corresponding System.
But when I try to install own-package on a Oracle Linux Server 7.9 it tries to install own-package-rhel8 which depends on python38 that is not existing in the Repos for Oracle Linux Server 7.9
Is it possible to have yum to choose the right Package depending on resolvable Dependencies ?