I'm trying to create an RPM (my-main-rpm
) that has over 10 dependencies (most of which are not made by me), but I want to first install another RPM (my-rpm-prerequisite
) created by me. This my-rpm-prerequisite
RPM creates/modifies some files that need to be done before the other dependencies install.
I want to be able to install the whole rpm using the single command: dnf/yum/zypper install my-main-rpm
which should install all the dependencies. But I want that command to first install my-rpm-prerequisite
Is there any way I can do this?
Or is there some way I can execute a script before my dependencies are installed?
Afaik that is not possible. The
rpm
dependency system just makes sure that the dependencies for each package are installed, but not in which order. Your dependencies might already be present on the system before you run the installation ofmy-main-rpm
. In that case it is impossible to make your script run before the installation of your dependencies since they are already installed.The only way I see you can influence the order of installation is by setting dependencies, but you can only do that on packages you create yourself: