Chapter 12. Package Management

Table of Contents
12.1. General packages management
12.1.1. RpmDrake components
12.1.2. Selecting packages
12.1.3. Installing new packages
12.1.4. Uninstalling packages
12.2. Updating installed packages
12.2.1. Setting up the package source
12.2.2. Selecting packages to update

12.1. General packages management

From time to time, you may wish to delete packages that aren't used anymore, or to install new packages from a CDROM, a directory, or some site on the Internet. You can perform all of these actions with a single tool:

Figure 12-1. The main window of RpmDrake

12.1.1. RpmDrake components

The components highlighted are:

  1. These buttons allow you to choose between the two actions available: "installing" (i.e. adding) or "uninstalling" (i.e. deleting) packages.

  2. There you can see a hierarchical view of all the package groups installed, or ready to be installed (according to what you're doing: uninstalling or installing). Click on a group name to see the packages it contains.

  3. When you select a group of packages, this is where the packages contained in it are listed. To have a short description of a package, simply click on it's name.

  4. This is where the selected package's description is displayed.

  5. Here you have buttons to perform a few actions (from left to right):

    Expand all

    You can see the package groups are organized in a tree manner, like directories: you can expand a branch by clicking on the + next to its name. This button will expand all the branches.

    Collapse all

    In contrast to the above, this button will "close" all branches.

    Select all

    This will select all the packages, regardless of any previous selection.

    Unselect all

    This will unselect all the packages, regardless if you have selected some before.

    Show selected

    This will list only the packages you've selected.

    Install (or Uninstall) selected

    This button is where you must click to really perform the action you wanted: installing or uninstalling the packages you have selected.

  6. Finally, you can search for a package: enter here a few characters of it's name or role, then click Search.

12.1.2. Selecting packages

Selecting packages is quite easy. Select a group of packages by clicking on it's name: you then see the package list is filled with available packages in this group:

Figure 12-2. Available packages in a package group

On the left of each package, you can see a little square box: simply click on it, and the package is selected! For instance, in the following list we have selected freeciv and gnuchess :

Figure 12-3. Selecting packages

Note in the bottom of the window, the status bar displays how many packages you've selected and their total size together.

12.1.3. Installing new packages

RpmDrake allows you to install new packages contained in RPM files hosted on different locations.

12.1.3.1. Setting up the source media

To install new packages, you need to tell RpmDrake where to find the RPM files. By default, it will look for them on the installation CDROM, but you may add any location you want, even through the Internet. To set up an additional location, use the label Preferences in the File menu.

You then get this window:

Figure 12-4. Setting source media

As the figure suggests, you can have several source medias, displayed as a list.

From left to right, the three buttons on the top mean:

  1. removing the selected media from the list ;

  2. adding a new media to the list ;

  3. updating the packages available in a media: this may be useful if the media is hosted on a foreign computer, an FTP server for instance.

Removing and updating are rather obvious. We'll explore more in-depth how to add a media to the list. For this, click on the second button. You then get this window:

Figure 12-5. Adding a source media

First of all, you need to determine the type of source media you want to add. You can use four different types, for which we'll soon go into further details. In any case, you have to give the new media a name to identify it: this can be any string you want.

According to the source media type you're setting up, the other parameters you need to fill are:

  1. Local CD-ROM

    Figure 12-6. Adding a CDROM as source media

    The only additional field is a CDROM number. It is used to get the order in which the CDROMs are explored. Please note that the CDROM is supposed to be mounted.

  2. Local directory

    Figure 12-7. Adding a local directory as source media

    You just need to give a directory containing RPM files. You can use the big button on the right to browse your directory tree. Note that the subdirectories are not parsed to find RPM files.

  3. Remote FTP server

    Figure 12-8. Adding an FTP server as source media

    The URL you give must start with ftp://, followed by the server name and the directory on the server, for example:

    ftp://ftp.free.fr/pub/Mandrake/7.2/RPMS

    The hdlist file mentioned is a file containing a summary of what's available. It must be present on the server! Give a path to it, relative to the directory you mentioned above.

  4. Remote HTTP server

    Figure 12-9. Adding an HTTP server as source media

    The fields are the same as for the previous FTP server. The only difference is that the URL is supposed to begin with http://.

12.1.3.2. Installing selected packages

When you are done with selecting all the packages you want to install, click on Install selected. For more security, check that you have all you want by using the Show selected button...

If the packages you're installing are on a CDROM, you may be prompted to insert the corresponding CDROM. Then the installation starts.

Sometimes, you'll want to install packages that require other packages to work properly: that's what is called "package dependencies ". If this happens, you'll get a little window like the following:

Figure 12-10. Unsatisfied dependencies notification

It is displayed only if you didn't select all the needed packages. In our example, we selected postgresql-odbc-7.0.2-4mdk, which needs postgresql-7.0.2-4mdk, which we didn't select... So we're prompted. Check for sanity, but in most cases just click the OK button.

During the installation, you'll see this progress window:

Figure 12-11. Packages installation in progress

The top bar is the current package progress, the bottom one is the whole process progress, the middle one shows the progress of the package downloading.

12.1.4. Uninstalling packages

Use the button on the top to choose Uninstalling. This time, the package groups list shows the packages already installed on your system.

Select the packages you want to uninstall as usual, then click on the big button on the top now labeled Uninstall selected. Note that you don't have to bother with dependencies: if you try to uninstall packages that are needed by other packages that you don't uninstall also, RpmDrake won't do anything.


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2000.
http://www.linux-mandrake.com/