-->

Previous | Table of Contents | Next

Page 312

In addition to these queries, complete information about a package can be determined by using the info option. For example,


rpm -qi kernel

gives the following information about the installed kernel package:


Name        : kernel            Distribution: Red Hat Linux Vanderbilt

Version     : 2.0.27            Vendor: Red Hat Software

Release     : 5                 Build Date: Sat Dec 21 21:06:28 1996

Install date: Thu Jul 17 14:10:52 1997    Build Host: porky.redhat.com

Group       : Base/Kernel       Source RPM: kernel-2.0.27-5.src.rpm

Size        : 565900

Summary     : Generic linux kernel

Description : This package contains the Linux kernel that is

Âused to boot and run your system. It contains few device

Âdrivers for specific hardware. Most hardware is instead

Âsupported by modules loaded after booting.

Here is a summary of the query options:

-l Lists all the files in a package
-s Lists the state of files in a package
-d Lists all files in a package that are marked as documentation
-c Lists all files in a package that are marked as configuration
-i Lists the complete information for a package

If any of these options, except for -i, are given along with a -v option, then the files are listed in ls -l format. For example,


rpm -qlv kernel

outputs the following:


-rw-r--r---     root     root     104367 Dec 21 21:05 /boot/System.map-2.0.27

-rw-r--r---     root     root      11773 Dec 21 21:05 /boot/module-info

-rw-r--r---     root     root     449760 Dec 21 21:05 /boot/vmlinuz-2.0.27

In addition to the preceding query options, RPM also understands the following query
options:

-a Lists all installed packages
-f file Lists the package that owns the specified file
-p package Lists the package name of the specified package

Page 313

Verifying Packages

Verifying packages is an easy way to determine if there are any problems with an installation. In verification mode, RPM compares information about an installed package against information about the original package, which is stored in the package database at install time.

The basic syntax for verifying a package is as follows:


rpm -V [package]

If a package is verified correctly, RPM will not output anything. If RPM detects a difference between the installed package and the database record, it outputs an 8-character string, where tests that fail are represented by a single character and tests that pass are represented by a period (.). The characters for failed tests are as follows:

Character Failed Test
5 MD5 Sum
S File Size
L Symlink
T Mtime
D Device
U User
G Group
M Mode (permissions and file type)

For example, on my system, verifying the bash package using


rpm -V bash

fails as follows:


.M..L...  /bin/bash

....L...  /bin/sh

This indicates that the size of my bash is different from the information stored in the database. This is okay on my system because I have recompiled bash.

In addition it is possible to use the query option -f to verify a package containing a particular file, which is helpful when diagnosing problems with programs. For example, if ksh were behaving peculiarly,


rpm -Vf /bin/ksh

would verify the package that ksh came in. If any of the tests fail, you will be closer to understanding the source of the problems.

Page 314

Introduction to glint

The most common way most users interact with RPM is via glint, the graphical Linux installation tool. glint is an X-based interface for RPM that allows for installing, uninstalling, querying, and verifying packages via a graphical "File Manager" interface.

glint is accessible from the command line or the Control Panel application that comes with Red Hat Linux. To launch glint, simply type


glint

at the prompt. glint accepts no command-line options. When glint is loading, a message such as


Glint Graphical Package Manager -- version 2.1.5 Copyright (d) 1996

ÂRed Hat Software

ÂThis may be freely redistributed under the terms of the GNU Public License

will appear in the terminal window. After glint has loaded, a window similar to Figure 14.1 will appear.


Figure 14.1.
The primary
glint window.

From this window, different packages can be selected and queried, verified, uninstalled, or installed. When you click the Available button, all packages available for installation from the default location (/mnt/cdrom/RedHat/RPMS) will be listed in the Available Packages window, as shown in Figure 14.2.

Page 315


Figure 14.2.
The Available Packages
glint window.

By navigating through the folders, you can select and install different packages. As an example, let's take a look at installing the vim package.

To install the vim package, first launch glint; then in the Installed Packages window, click the Available button. When the Available Packages window appears, select the Applications folder and then the Editors folder. Then, click the package vim-4.5-2, which becomes highlighted (see Figure 14.3).


Figure 14.3.
Available Packages
with vim selected.

Page 316

When a package is highlighted, it can be installed by clicking the Install button. You can install many packages at once by highlighting more than one package.

When you click the Install button, the Installing dialog box appears (see Figure 14.4). This dialog shows the progress of the installation.


Figure 14.4.
The Installing dialog.

When vim has been installed, it will be removed from the Available Packages window.

In this example, I assumed that the available packages were stored in the default location mentioned earlier. Often that is not the case. You can change this location by first clicking the Configure button in the primary glint window (refer to Figure 14.1). Then, enter the different location where the package files are located in the Configuration dialog that appears (see Figure 14.5).


Figure 14.5.
Changing the package
location.

glint also provides a nice front end for querying packages. glint executes most of the queries automatically and displays the results in a tabular form. For example, a query of the vim package looks similar to Figure 14.6.

Previous | Table of Contents | Next