LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-08-2009, 11:07 AM   #1
dwong05
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
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.
 
Old 04-08-2009, 12:41 PM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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).
 
Old 04-11-2009, 10:51 AM   #3
dwong05
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
I now understand the background logic of using RPM and YUM much more. Thanks.
 
Old 04-12-2009, 08:08 PM   #4
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
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.

Last edited by Tinkster; 10-30-2010 at 03:24 PM.
 
Old 04-12-2009, 08:19 PM   #5
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
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).
 
  


Reply

Tags
command, rpm, yum



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
YUM - disable certain packages from updating Micro420 Fedora 5 03-19-2010 11:17 AM
updating yum packages list bakhanbeigi Linux - Networking 3 08-24-2008 01:47 AM
Installing, Updating packages w/Yum mickeyboa Fedora 4 07-05-2007 03:27 PM
difference betwenn yum and rpm -i Balakrishna Linux - Newbie 2 12-26-2006 12:16 AM
Difference between .src.rpm & .tar.gz packages chinmay nautiya Linux - Software 18 08-10-2006 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration