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. |
As far as understanding where it got the extra dependencies for installing A; it either found them on the system or checked the online repos.
yum update will not install just any packages. It will only update those packages which are already installed. In certain cases newer versions of a given packages will have new dependencies and in only that case will additional (new) packages be installed (as opposed to updated). Either way you update (rpm or yum) you will get the same amount (GB) of packages. It is just easier to let yum hunt down the dependencies for you. Confirming what yum is going to install is an easy way to monitor what it is doing. It will list what packages it is upgrading as well as what new packages it is installing (it automatically list them separately). |
I now understand the background logic of using RPM and YUM much more. Thanks.
|
Yum is actually a higher level approach to deal with RPM packages. For this Yum needs to have repository information (a list of available packages at some website) to do it's job. Proper RPM packages will have dependency information available anyway.
|
maresmasb
Sorry maresmasb but yum does not need a repo to work. See man yum, the localinstall section. It does need a repo IF there are dependencies required (source for dependencies). |
All times are GMT -5. The time now is 04:22 PM. |