system.
> extras
— This lists the installed packages that are not present in any of the configured repositories.
So if I want to find out which packages I have installed on my system, I use the command yum list installed
to return a detailed summary of packages installed and their version numbers. You can take this one step further and query for individual pack ages. You might want to find out which version of OpenOffice.org you have installed and which version is available for installation. For this, you use yum list openoffice.org
— the results of which would show you which version was installed and which version was available for updating.
yum
can also search the headers and summaries for each RPM file so that you can find specific information about packages that would not usually be available in just the package name itself. For example, using yum search kdebindings
would bring up entries matching kdebindings
. The results of this command are shown here:
$ yum search kdebindings
Loading 'refresh-updatesd' plugin
kdebindings-devel.i386 : Development files for kdebindings
kdebindings-dcopperl.i386 : DCOP Bindings for Perl
kdebindings-devel.i386 : Development files for kdebindings
kdebindings.i386 : KDE bindings to non-C++ languages
kdebindings-dcopperl.i386 : DCOP Bindings for Perl
kdebindings.i386 : KDE bindings to non-C++ languages
Configuring yum
As mentioned earlier, yum
is primarily controlled by the contents of the yum.conf
file and the /etc/yum.repos.d
directory. Let's take a closer look at the contents of both of these so that you can get a better understanding of how best to configure yum
.
When you initially install Fedora, a default yum.conf
file provides several switches for the yum
command. It basically saves you from having to type in a number of switches and keeps yum
simple. By default, yum
is configured to do the following:
> Keep a cache of headers in /var/cache/yum
> Give minimal onscreen information during processing
> Keep a log file in /var/log/yum.log
> Download only the most up-to-date packages
> Be tolerant of errors in the process
> Match packages to your processor architecture
> Have a maximum retry limit of 20 times
> Check for obsolete packages
> Use GPG keys to ensure the identities of packages
All these options are contained within the yum.conf
file, letting you easily modify or even remove certain lines. For instance, you might need yum
to try only a maximum of five times, or you might need yum
to give you more visual information.
You can add repository information into the yum.conf
file, but an easier way to handle repos is to use the /etc/yum.repos.d
folder. This folder enables you to create individual configuration files for each repository. By default, Fedora comes with repositories for their base packages, updated packages, updated packages that are in testing, and the more unstable development packages. Only the base and updated packages are enabled by default.
Unless you really know what you are doing, avoid the more unstable repositories of fedora- updates-testing
and fedora-development
. These repositories contain bleeding-edge packages that can break your system. You have been warned!
Opening a repository file shows you some details about the repository itself, including the path to it (either via HTTP, FTP, or local access), any lists of mirrors for that repository, whether that repository is enabled, and whether GPG checking is enabled.
If you want to add a new repository, you need to find out a few things before you can successfully add it to either its own repository file under /etc/yum.repos.d
or in the yum.conf
file.
You can also configure yum to ignore or exclude updates to certain packages. So, for instance, if you have a graphics driver that works only with a specific kernel version and you do not want to have to fix it every time a new kernel is released, you can elect for yum
to exclude any kernel updates. Within the yum.conf
file, you need to add a line within the top section similar to this:
exclude=kernel
This tells yum
to ignore any packages that start with kernel
, and should limit the amount of repair work you have to do when a new kernel version is installed.
Using pirut
for Software Management
Up to now we've focused solely on command-line utilities that you can use to manage your software. Fedora also offers a number of graphical tools for package management, including pirut
, yumex
(Yum Extender), and pup
. Chapter 2, 'Fedora Quick Start' covered pup, so the next two sections cover pirut
and yumex
. The default graphical package management tool in Fedora is an application named pirut
, which cunningly has been renamed Add/Remove Software in the Applications menu. This application replaces kpackage
, gnorpm
, and xrpm
— all of which are no longer provided. Add/Remove Software allows you to select packages arranged in categories and install or remove them.
Launch pirut
by clicking the Applications menu on your desktop, and then choose Add/Remove Software. You are asked for the super-user password, and then the package management tool launches with the package-browsing screen, shown in Figure 34.2.
FIGURE 34.2 The initial screen of pirut
allows you to browse through packages sorted by groups.
The packages listed in the screen are organized into broad categories, with subcategories listed on the right side. Tick the box next to each subcategory to select the default pack ages for it. The numbers to the bottom of the package group window indicate the number of packages installed on your system and the total number of packages available in the group. In Figure 34.3, you can see that 24 of 78 possible KDE packages have been installed.
FIGURE 34.3 All three main window managers have been selected in this view.
You can see brief information about the subcategories in the box below the selection. Use the Optional Packages button to get access to all the optional packages related to that subcategory. Just check each box to select that package, and click Close to return to the main window. Clicking the Apply button starts the download and installation process, which can take some time, depending on the number of packages you specify.
The pirut
tool also enables you to search for specific packages and to browse through a long list of packages. Just tick each package you want to install and click the Apply button. With the search