# The &kpackage; Handbook

## Introduction

&kpackage; is a &GUI; interface to the RPM, Debian, Slackware and BSD package managers. &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.

### The Main Window - Package Tree

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.

&kpackage; Left Panel Left Panel - Package Tree

Left Panel - Package Tree

The left panel displays the list of packages, the tabs along the top determines which packages are displayed:

- Installed - Show installed packages

- Updated - Show packages for which newer versions are available

- New - Show uninstalled packages

- All - All packages

The package tree is based on the sections of the distribution and show summary information about the packages:

- Package - Name of the package

- Mark - Shows a tick if the package has been marked. Marking allows multiple packages to be installed or uninstalled at once using the buttons located below the package tree.

- Size- The package size

- Version - The package version

- Old Version - If the package updates an installed package, the version of the old package

The packages have graphical labels to indicate their state, an image representing the package type means an installed package, a N indicates an available package and a U means a package that can upgrade an installed 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 mark a range of packages and &Ctrl;left click can be used to add and remove marks on packages.

Selecting a package from the tree displays information about it in the right panel.

### The Main Window - Package Information Panel

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

- &kpackage; Right Panel - Properties Right Panel - Package Properties

  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 but available packages are in italic and dependencies that aren't available are normal text.

- &kpackage; Right Panel - Properties Right Panel - The Files in the Package

  The File List tab shows the files in the package and for installed packages (provided the information is available) shows the state of the files. Files that exist are marked with a tick, those that are missing are marked with a cross.

- &kpackage; Right Panel - Properties Right Panel - The Files in the Package

  The Change Log tab shows the change log for the package.

### 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 Install Marked button on the left panel, which pops up the install window.

&kpackage; Install dialog Install Dialog

Install Dialog

The install window lists the packages to be selected to be installed in a panel in the top left, if Debain APT is being used the packages needed to satisfy any dependencies are also shown. Below this there are a set of check boxes which set options for the install program. For RPM packages the options are:

- Upgrade - Will upgrade any already installed package.

- Replace Files - Install the packages even if they replace files from other, already installed, packages.

- Check Dependencies - Verify dependencies.

- Test - Don't do the install

For Debian APT the options are:

- Download only - Fetch the packages but don't install them.

- No download - Only use packages that are locally available

- Ignore missing - Do the install even if some packages are missing

- Ignore hold - Ignore holds that have been placed on packages

- Assume yes - Answer yes for any questions the install program would ask.

- Test - Don't do the install

The Install button will start the actual install. Normally the install window will be deleted after a successful install but if the Keep this window check box is selected the window will stay around.

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.

### Uninstalling Packages

A selected package can be uninstalled by using the Uninstall button in the right panel, the Uninstall Marked in the right panel can be used to uninstall marked packages. The buttons bring up the uninstall window.

&kpackage; Install dialog Uninstall Dialog

Uninstall Dialog

The Uninstall button in the window causes the packages to be uninstalled, and the right panel provides an integrated terminal window for the uninstall program.

For RPM packages the options are:

- Use scripts - Execute any unistall scripts

- Check Dependencies - Verify dependencies.

- Test - Don't do the install

For Debian APT the options are:

- Purge Config Files - Remove any package configuration files.

- Assume yes - Answer yes for any questions the install program would ask.

- Test - Don't do the install

### Integrating available packages in the tree

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

&kpackage; Install dialog Package Handler Panel

Package Handler Panel

The top part of the panel has the Remote Host box which allows &kpackage; to operate on the packages on a remote computer, this functionality requires `ssh` and is only available when using Debian apt. The name of the remote computer is entered into the combobox and &kpackage; will access it when the Use remote host checkbox is selected.

The rest of the panel allows the enabling and disabling of the various package types that &kpackage; can handle. If a package type is enabled the Location fo Packages button will bring up a dialog for setting the location of available packages.

&kpackage; Install dialog RPM Location Dialog

RPM Location Dialog

For RPM packages &kpackage; can read a folder 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 folders each package file is read, this is slower but gives a full description.

The RPM locations dialog allows the specification of folders containing RPM packages, it's divided up into a number of tabbed panels for convenience of management. Each line in the panel specifies a folder, the Use checkbox is selected the folder is used, otherwise it's ignored. The text entry field can take either a folder path or an `ftp` URL. The Subfolders checkbox determines whether subfolders are searched for packages. The ... button will pop up a folder selection dialog.

&kpackage; Install dialog Debian Apt Location Dialog

Debian Apt Location Dialog

APT: Debian means that Debian packages are handled using the `deb-apt` command which can automatically fetch packages from repositories and resolve dependencies.

The location of uninstalled package repositories can be set in the "A" panel, this is used to write the `/etc/apt/sources.list` file which controls where `deb-apt` searches for packages, each entry corresponds to a line in the file, if the Use checkbox is not set the line is commented out.

The "D" panel allows the specification of folders containing Debian packages.

&kpackage; Install dialog Debian DPKG Location Dialog: L and P panels

Debian DPKG Location Dialog: L and P panels

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

- The "I" panel specifies the location of the Debian package tree and selects the distribution and architecture. &kpackage; will look in the standard places for the Package files describing the available packages and these packages are then added to the package tree and can be examined or installed

- The "P" panel specifies 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.

- The "D" panel specifies folders that are handled in the same way as with RPM packages.

&kpackage; Install dialog Slackware Location Dialog

Slackware Location Dialog

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 folder 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.

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

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

- The "D" panels are for folders that do not have a corresponding `PACKAGES.TXT` fi le

&kpackage; Install dialog BSD Location Dialog

BSD Location Dialog

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

The "Ports" panel gives the location of the ports tree in the file system

The "Packages" panel allows the specifying the location of packages folders &ie; those containing `INDEX` files

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

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

### Misc

#### 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 pseudo 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;.

#### 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.

## 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

Packages Mark All

- Marks all packages that are members of the selected view

Package Install

- Install the currently selected package

Package Install Marked

- Install all marked packages

Package Uninstall

- Uninstall the currently selected package

Package Uninstall Marked

- Uninstall all marked packages

### Cache menu

The items in the Cache menu are:

Cache Clear Package Folder Cache

- Delete cached copies of remote package folders 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 Shortcuts...

- 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. It also sets whether to access a remote host for Debian apt.

Cache

- Controls caching of remote (&FTP;ed) folders and Package files.

  Cache Remote Package Folders

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

Cache Remote Package Files

- Whether to cache remote package files that have been fetched

Cache Folder

- Where to cache package files and folders

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 folder are read instead of just using the files names, this is slower but shows more information.

### 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 and &kde; 3

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`

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``.