Package Manager Question

Rick Stevens ricks at nerd.com
Tue Mar 16 17:26:45 UTC 2010


On 03/15/2010 06:44 PM, Karl Pearson wrote:
> Hi all,
>
> I use Fedora on my server (email, web, etc.) and have been using Linux
> Mint on my desktop and laptop.
>
> I've noticed something that has caused me to ask this question. First,
> what I've noticed:
>
> When I update a package using that package's 'Check For Update' feature on
> the Help menu (Virtualbox is a prime example), Linux Mint, which uses
> dpkg, the debian package manager, automatically updates the repository
> indexes on my PC and shows the package installed when I run Synaptic.
>
> I don't remember YumX ever doing this, or any other RPM front-end, or rpm
> itself from the commandline. If I didn't install a package from the
> repositories, rpm didn't know it was there.
>
> Do you know if this has been "fixed" (if it's actually broken)?
>
> I'm going to install a new server with CentOS soon, and have toyed with
> the idea of using it as my workstation OS as well.

What you're experiencing is standard yum practice.  It doesn't know
about repos unless it has a config for it.

A config is a stanza inside a file in the /etc/yum.repos.d directory.
A stanza starts with the name of the repo in square brackets, e.g.:

	[fedora]

Following that is a number of things which control how yum interacts
with the repo.  One of the most important is:

	enabled=[0|1]

If the stanza has "enabled=1", then yum will check and/or use it. If
it has "enabled=0", then it's ignored.  Default is "enabled=0" for any
stanza that doesn't have it explicitly defined.

You can force a disabled repo ("enabled=0") to be scanned by adding:

	--enablerepo=<repo-name-glob>

on the yum command line before any commands.  Example:

	yum --enablerepo=livna update

The standard way of checking for updates interactively is by doing a

	yum update

It'll tell you if there are things that need updating.  If there are, 
it'll ask you if you want to do the update now.  If you way "yes", the
the update process begins.

If you want just want to check for updates non-interactively (e.g. in a
script), use:

	yum check-update

which will return a return code of 100 if there are things that need
updating, 1 if an error occurs and 0 if there are no updates.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, C2 Hosting          ricks at nerd.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-     I.R.S.: We've got what it takes to take what you've got!       -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list