Package Management

From openSUSE

A Linux distribution, and openSUSE/SUSE Linux is no exception, is a bunch of applications stored in Packages and the necessary utilities to manage these applications as a whole.

Contents

Archive formats

Packages are archives of files that include all the files making the given application (e.g. the Mozilla package is made of all the Mozilla files) and, eventually, instructions on the way to make them work. See Wikipedia for further background on software packages.

There are essentially three kind of package formats.

  • tgz (tar gzip files). These files are basically archives. They can hold anything the package maintainer thinks useful. Apart from the archive format itself, necessary to extract the files, there is nothing standardised about the content of a tgz file.
  • deb (Debian). This is the standard Debian package system. It is managed by apt.
  • rpm (RPM Package Manager). First created by Red Hat Linux, it's used by many Linux distribution as packaging system. Standardized by the LSB

openSUSE/SUSE Linux began using tgz then used RPM and still uses this packaging system. openSUSE/SUSE Linux provides all the packaging tools to manage any packaging system, but only the RPM system is officially supported and will be presented here.

Relations

The importance of the package archive is the relations they contain.

At first, the archive relates files to packages so one can associate files on disk to a(n installed) package.

Secondly, packages depend on other packages. Packaged applications are not self-contained, they need an execution environment (other tools, libraries, etc.) to work.
Package dependencies are used to express such relations.

RPM Packages

In openSUSE/SUSE Linux, native software comes packaged in the RPM package format. RPM is a pretty powerful package manager, but it manages RPM archives one by one. The included command line tools are only checking and not solving dependency problems. At the first sight of a problem RPM will just present that problem to the user and leave it for him to decide what to do.

For instance if you want to install RPM package A that has dependencies to RPM package B, RPM will not automatically install package B but just tell you that it needs package B and stop. It's up to the user to install package B and then afterwards package A. Now imagine package B has dependencies on package C and package D and package D has dependencies to package E and so on and so on. You end up chasing package dependencies manually down all the branches of this very huge tree.

That is why we need programs on top of RPM to do that. And there you have a lot of options. The following should help you to find the software installer that suits you most.

Package Repositories

Before packages can be installed, they must be available -- either on physical media like CD or DVD or online via the internet.

All these are called repositories but various other names (like installation source or catalog) are also in use.

Read on here to learn more about repositories.

Package Management Tools

openSUSE/SUSE Linux ships with a variety of tools for package management. Some of them are restricted to RPM packages while others allow a more generic software management, including patches, patterns, and products.

Saving package list

SUSE Linux 10.1 has a problem with this, see a workaround here

Related pages


External links

Wikipedia entry about package management.