# The &kpackage; Handbook

Toivo
Pedaste

    toivo@ucs.uwa.edu.au

Lauri
Watts

    lauri@kde.org

Reviewer
2000
Toivo Pedaste
&FDLNotice;
2002-10-08
3.0.8

&kpackage; is a &GUI; interface to the RPM, Debian, Slackware and BSD package managers.

kpackage
package
package manager
RPM
deb

## Introduction

&kpackage; is a &GUI; interface to the RPM, Debian, Slackware and BSD package managers. It is similar in some ways to GLINT. &kpackage; is part of the K Desktop Environment and, as a result, it is designed to integrate with the &kde; file manager.

## Onscreen Fundamentals

&kpackage; has two panels. The left panel displays a tree of the installed and available packages, the right panel displays information on the packages.

### Drag and Drop

&kpackage; makes use of the &kde; Drag and Drop protocol. This means that you can drag and drop packages onto &kpackage; to open them. Dropping a file onto the Find File dialog will find the package that contains the file.

### The Package Tree Panel

When &kpackage; is started normally (that is it has not been invoked via drag and drop and has not been given any parameters) it displays two panels with the package tree on the left, this tree shows installed packages and optionally new and updated packages as well.

The tabs on the panel select whether to display installed packages, updated packages, available packages or all packages

The package tree shows the package name, package size, the version and (in the case of an available package which would update an installed package) the version of the already installed package.

Selecting a package from the tree displays information about it in the right panel and allows:

- Displaying the status information on the package

- Seeing which files are included in an installed package, selecting a file from the list will open it using the file manager

- Verifying files in a package, files that exist are marked with a tick, files that don't with a cross.

- Uninstalling an installed package

- Installing an available package

A single package is selected by clicking on the name. Clicking on the dot in the Mark column marks the package with a tick, a second click unmarks it, while &Shift;left click can be used to select a range of packages.

### Integrating available packages in the tree

Access to available is setup via the Location menu entries for each package type under the Settings menu.

For RPM packages &kpackage; can read a directory containing packages and add these to the package tree as either new or updated packages. It is possible to examine or install these packages from the package tree. By default the information about the packages is extracted from the standard format of the file names and so it is necessary to use the Examine button to see the full description, it is possible though to set an option so that for local directories each package file is read, this is slower but gives a full description.

For Debian packages that are handled using `dpkg` there are three ways of accessing available packages, these can be selected in three different types of location setting panels.

- Specify the location of the Debian package tree and select the distribution and architecture, &kpackage; will look in the standard places for the Package files describing the available packages, these packages are then added to the package tree and can be examined or installed

- Specify the location of the Debian distribution along with the Packages files for the parts of the distribution that are of interest. If the `dselect` program is being used then the file `/var/lib/dpkg/available` can be used as a Packages file that describes the distribution that `dselect` uses.

- Packages directories can be handled in the same way as with RPM packages.

For Debian packages that are handled using APT the location of uninstalled package repositories is set in the `/etc/apt/sources.list` file, the Location menu can still be used for directories containing Debian packages. These packages are fetched and cached by apt itself, not by &kpackage;

For Slackware packages there is very little information stored on installed packages, but it is possible to use a `PACKAGE.TXT` file as a source of information about the installed packages. The `PACKAGES.TXT` file is the equivalent of a Debian Packages file and Slackware distributions are structured with a directory tree containing the `.tgz` packages and a `PACKAGES.TXT` file that describes the packages.

As with Debian distributions the packages in a Slackware distribution can be integrated into the package tree. Unfortunately the Slackware packages don't carry version information so it is not possible to tell with available packages are newer than installed ones.

For BSD packages &kpackage; will understand a packages distribution directory that contains an `INDEX` file (which describes all the packages) and also contains an `All` directory (with all the package files in it).

For remote directories and package files (&ie; those fetched via &FTP;) &kpackage; will do caching, the packages are cached in `~/.kpackage` and the directories in `~/.kpackage/dir`

For the handling of remote (&FTP;) directories to work, it may be necessary to not have the FTP Proxy set in the Browser Settings.

### Package Information Panel

The right panel has tabs for displaying two different types of information about selected packages

- The Properties tab which displays information on the selected package. In the dependency information there are hyper-links to the packages listed, installed packages are in standard font, uninstalled packages are in italic.

- The File List tab shows the files in the package and for installed packages shows the state of the files.

### Root Access

&kpackage; requires root access for installing/uninstalling packages, this can be can be done by running &kpackage; as root, say by using &kdesu;.

Alternatively, if &kpackage; is running as a normal user it will try to run the install/uninstall programs a root by logging in to a psuedo terminal, it will use either `su` or `ssh` to do this and if needed it will pop up a terminal window where the root password can be typed. For this to work the root prompt has to end in #.

This doesn't work for RPM packages, because they are handled internally by &kpackage;.

### Installing Packages

To install a package you can

- locate the package you wish to install in &konqueror;, drag it onto a running copy of &kpackage;

- click on a package file in &konqueror; and start a new copy of &kpackage;

- use on the Open menu items in &kpackage;

- selecting an available package in the package tree

For a selected package, use the buttons in the right panel, the Fetch button will fetch the package from a remote source and display detailed information, the Install button pops up the installation window.

For marked packages, use the button in the left panel, the Install Marked button pops up the install window.

The install window lists the packages to be installed and allows the setting of install options. The panel on the right is an integrated terminal window in which the installation programs are run, for interactive installation programs the interaction is done in this window.

RPM packages are handled slightly differently from other package types, since the installation is done directly by &kpackage;, the right panel is only used for error messages.

### Uninstalling Packages

A selected package can be uninstalled by using the Uninstall button in the right panel, this brings up a window with the uninstall options, the Uninstall button in the window causes the packages to be uninstalled, and the right panel provides an integrated terminal window for the uninstall programs.

Marked packages can be uninstalled using the Uninstall Marked button in the left panel.

## Menus

This describes the &kpackage; menus.

### File menu

The items in the File menu are:

&Ctrl;O File Open

  Brings up file selector for local and &FTP; files

File Open Recent

  A list of the most recently open package files

&Ctrl;F File Find Package

  Search the installed package list for a package, the name of which contains the entered string

File Find File

  Produces a list of packages that contain the entered file name, selecting a line will display the information on that package. It behaves slightly differently for RPM (where you have to enter the exact file name) and DEB (where you can enter a regular expression).

F5 File Reload

  Reread the package data and rebuild the package tree

&Ctrl;Q File Quit

  Quit &kpackage;

### Packages menu

The items in the Packages menu are:

&Alt;Left Arrow Packages Back

  Back button for navigation using the links in Properties entries in the right panel.

&Alt;Right Arrow Packages Forward

  Forward button for navigation using the links in Properties entries in the right panel.

Packages Expand Tree

  Fully expands the packages tree

Packages Collapse Tree

  Collapses the package tree so that only the tree structure is shown

Packages Clear Marked

  Unmarks all packages

### Cache menu

The items in the Cache menu are:

Cache Clear Package Directory Cache

  Delete cached copies of remote package directories and Packages files

Cache Clear Package Cache

  Delete cached copies of remote package files that have been fetched

### Special menu

The Special contains actions related to specific package types:

Special APT: Debian
  Update

    Update `apt` indexes from package repositories.

  Upgrade

    Upgrade the Debian installation to the latest versions of all the packages.

  Fixup

    `apt` is extremely strict about dependencies, attempt to fixup dependency problems

### Settings menu

The items in the Settings menu are:

Settings Show Toolbar

  Toggle displaying the toolbar

Settings Save Settings

  Save options immediately

Settings Configure Key Bindings

  The standard &kde; dialog for setting shortcut keys

Settings Configure Toolbars

  The standard &kde; dialog for configuring tool bars

Settings Configure KPackage
  Types

    Which package types to handle, Debian using DPKG and Debian using APT are listed separately, it is not a good idea to enable both at the same time.

  Directory Cache

    Whether to cache remote (&FTP;ed) directories and Package files.

  Package Cache

    Whether to cache remote package files that have been fetched

  misc
    Use SSH for privileged commands

      Use `ssh` instead of `su` for running privileged commands

    Verify file list

      If set the list of files in the package is checked to see if they are actually installed

    Read information from all local package files

      If set all the files from a (local) package directory are read instead of just using the files names, this is slower but shows more information.

Settings Location of available packages
  Location RPM

    This provides for specifying the location of package directories (either local or &FTP;), each line includes an entry where the &URL; or name of the directory can be typed in, a ... button that brings up a file selector and a Use radio button that determines whether the directory given in the line is to be used or not. The SubDirs radio button indicates whether to recurse down into sub-directories. The multiple panels are just for convenience.

  Location BSD

    The first panel gives the location of the ports tree in the file system

    The other panel allows the specifying the location of packages directories &ie; those containing `INDEX` files

  Location DEB

    There are three different types of panels.

    - The first three panels have an entry for the location of the Debian distribution tree, a combo box for the distribution name and a combo box for the architecture

    - The next two panels allow the specification of a Debian distribution tree and the location of Packages files in that distribution.

    - The last three panels specify directories the same way as for RPMs.

  Location SLACK

    For Slackware packages there are three types of panels

    - The first panel is the location of a `PACKAGES.TXT` file which is used to provided information on the installed packages

    - The next four panels can be used to specify the location of distributions with the directory tree containing the `.tgz` files and the location of the corresponding `PACKAGES.TXT` file

    - The last two panels are for directories that do not have a corresponding `PACKAGES.TXT` file

### Help menu

The items in the Help menu are:

&help.menu.documentation;

### Toolbar

- Open

- Back

- Forward

- Expand Package Tree

- Collapse Package Tree

- Find Package

- Find File

- Reload

- Quit

## Credits and Licenses

&kpackage;

Program copyright 1999-2000 Damyan Pepper, Toivo Pedaste

Documentation copyright 2000 Toivo Pedaste toivo@ucs.uwa.edu.au

&underFDL; &underGPL;

## Installation

### How to obtain &kpackage;

&install.intro.documentation;

For information on how to obtain and compile it see http://www.kde.org/install-source.html

There is more information on compilation at http://www.kde.org/compilationfaq.html

There is a web page at http://www.general.uwa.edu.au/u/toivo/kpackage

### Requirements

For installing &kpackage; you need:

- &Qt; 3.x and &kde; 3.1

For listing Debian packages no other software is needed but to install and uninstall the packages you need:

- the `dpkg` package manager or

- `apt-get` and `apt-cache`

For BSD packages you need the package management programs:

- `pkg_info`

- `pkg_add`

- `pkg_delete`

For Slackware packages you need:

- installpkg

- removepkg

For dealing with Redhat packages you need:

- RPM and RPM-DEVEL: 3.0 or 4.0

- the same libraries as compiling RPM does. These are:

  - `libdb` - the Berkeley database library

  - `libz` and `libz-dev` - compression library

  - RPM requires the gettext routine which is found in `libc6` or in `libintl`

  - RPM 3.0 may require the `popt` package

For &kpackage; to work correctly with RPM packages the RPM database must be initialized. If typing ``rpm` `-qa`` gives an error about `unable to open....` then try ``rpm` `--rebuilddb``.