I need to install an application that has 4 dependencies (output from .spec file):
Requires: PA-KBU-KBUONE-SHARED
Requires: PA-KBU-KBUONE-PLI-CONF
Requires: PA-KBU-KBUONE-PLA-CONF
Requires: PA-KBU-KBUONE-PLA-BIN
These 4 dependencies must be installed in that order (first SHARED, second PLI-CONF etc), but when I do yum install app, yum does a sort on that list:
Installing:
app noarch 10.0.0-1 localrepo 1.4 k
Installing for dependencies:
PA-KBU-KBUONE-PLA-BIN noarch 10.0.0-1 localrepo 20 M
PA-KBU-KBUONE-PLA-CONF noarch 10.0.0-1 localrepo 2.5 M
PA-KBU-KBUONE-PLI-CONF noarch 10.0.0-1 localrepo 10 k
PA-KBU-KBUONE-SHARED noarch 10.0.0-1 localrepo 7.1 k
Is there a way to control the order in which yum installs dependencies ?
Best Answer
Neither the SPEC file nor yum has any (command line) switches to determine order in which the dependencies are installed as far as I know. I think typically they end up in lexicographic order.
The only requirement with regard to dependencies is usually that they have to be met before the package that is dependent on them can be installed. If order is required and matters you're probably doing something wrong and it is not a dependency problem in the app package.
To force order automatically you have only have option really:
PA-KBU-KBUONE-PLI-CONF requires PA-KBU-KBUONE-SHARED
PA-KBU-KBUONE-PLA-CONF requires PA-KBU-KBUONE-PLI-CONF etc.
and generate a dependency chain that way.
Of course you always manually arrange them in the correct order, either install packages sequentially and typically when multiple packages are selected on a single yum command line, they're also installed in that order.