I have a package X depending on a software Y. Y is often compiled and installed manually by users but not always.
If I put a requirement in my spec file such as “requires: Y” the package Y will be downloaded by YUM and installed. If Y was installed by the user, it is simply overwritten which is not ok.
If I don’t put a requirement, those who don’t have Y will end up missing a necessary software to run X.
There is a way to know if Y is installed by checking the existence of a binary in a certain place or by checking an environment variable.
How to handle this situation ?
The
%presection of your RPM.specfile can be setup to check for the existence of the binary file.