It seems that if a package is already installed, "yum install" will try to update it to the latest version. This will cause "yum install" to fail if the latest version is missing dependencies. I know that I can suppress this with --skip-broken
, but I don't want to "skip broken" in case of packages which are not already installed; in that case I want it to fail.
I have seen in this answer that I can do this using an "if" statement if I am installing just one package, but I have a "yum install" statement containing some 15 packages, and don't want to run yum
multiple times (once for each package) as this adds a lot of overhead.
How can I get yum
to only install packages if they are not already present?