Difference of using RPM and YUM in updating packages
I have been using both the rpm and yum commands to update packages and I know that yum has the advantage of resolving the dependencies. I just don't know how the logic works.
For example, if I have downloaded a newer package e.g. A.rpm and I use rpm -Uvh A to upgrade an older version of A. The command returns an error message of "Failed Dependencies - A is needed by B" so I try to install B, and another error message "Failed Dependencies - B is need by (installed) C" comes up and this can go on and on.
Let's say in this example, A only needs B and C to be installed first, so I have to install it using something like rpm -Uvh B C A. In order for this to work, I have to find the B and C either from pointing to the original RedHat install CD or download it from Red Hat Network.
However, if I am using yum, it will automatically install A after I create a repository. I do not understand how and where yum is able to find B and C if they do not exist in the original OS install. Or is it that yum can bypass the requirement to first install B and C in order to upgrade A?
I have looked for Red Hat knowledge database and all I find is how to guide but there is no detailed explanation of how it works.
If I want to maintain an Red Hat OS up to date but I do not want to add additional RPMs i.e. updating A will require installing additional B and C, then what option can I have?
Many thanks for any suggestion.