| Index: > A B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
|
|||||
| First Prev [ 1 2 ] Next Last |
Originally developed by Red Hat for Red Hat Linux, RPM is now used by many Linux distributions. It has also been ported to some other operating systems such as NetWare by Novell.
Working behind the scenes of package manager is the RPM database. It consists of a doubly linked list that contains all information for all installed RPMs. The database keeps track of all files that are changed and created when a user installs a program and can therefore very easily remove the same files. If the database gets corrupted (which happens easily if the RPM client is killed), the double links ensure that it can often be rebuilt without any trouble. On RedHat systems the database is stored in /var/lib/rpm.
Every RPM package has a package label, which contains the following pieces of information:
and the RPM file would normally have the following format:
An example:
nano-0.98-2.i386.rpmHowever, note that package label is contained within the file and does not necessarily need to match the name of the file. Source code may also be distributed in RPM packages. Such package labels obviously do not have a architecture part and replaces it with "src". I.e:
libgnomeuimm2.0-2.0.0-3mdk.src.rpmAdditionally, libraries are distributed in two separate packages for each version. One containing the precompiled code and one containing the development files such as header files etc. for the library in question. Those packages have "-devel" appended to their name field. Users need to carefully check so that the version of the development package matches that of the binary package, otherwise the library may very well not work.
RPM Package Manager contains one command line tool called rpm with which packages can be installed, uninstalled and queried. Here are some examples on how to use it:
rpm -i xmms-1.2.7-21-p.i386.rpmInstalls XMMS on the system. Root access is needed.
rpm -U xmms-1.2.7-27.i386.rpmUpgrades XMMS on the system. Note rpm -U works exactly equal to rpm -i if the package is not yet installed.
rpm -qaPrints out all installed packages.
rpm -qi xmmsDisplay package information, including name, version, and description.
rpm -qpi xmms-1.2.7-27.i386.rpmWorks exactly the same as -qi, except that -qpi has a filename as parameter, and not the package name.
rpm --versionPrints RPM version.
rpm --rebuilddbRebuilds the RPM database. Very useful command if the database gets corrupted. Note that on some versions of rpm the program will not explicitly state that the database is corrupted and will just hang when rpm is invoked.
rpm -e xmmsRemoves XMMS from the system. Root access is needed.
Advantages of using RPM packages over other ways to acquire and install software often cited are:
Disadvantages often cited include:
RPM has also been criticized for a lack of consistency in package names and content, which can make automatic dependency handling difficult. However, this is not a problem unique to the RPM format, but rather a problem in co-ordination amongst major distributions who use RPM in packaging such as Red Hat, SuSE and Mandrake Linux. When using packages that are from a particular distribution (say Red Hat) or built for a particular distribution (for example Freshrpms [1] for Red Hat), then automatic dependency checking can work, using tools such as apt adapted from the Debian project (see below). A tool exclusively for Mandrakelinux is urpmiurpmi is a Mandrake Linux package management tool for installing, removing, updating and querying software packages of local or remote (networked) media. It wraps around the package manager rpm with the aim that the user should not have to suffer the ofte, and can help with the so called ' dependency hellDependency hell occurs in package-based operating systems particularly Linux and is a colloquial term for the frustration of many users who have installed software packages which have dependencies on specific versions of other packages. This version infor'.