"
urpmi", sometimes referred to as "urpm" or "User RPM", was first
introduced into Mandrake Linux 7.0, released in January 2000. It was meant
to be a powerful front-end to the "rpm" command. It came with dependency
resolution, search and other functions similar to the Debian's "apt" tool,
as well as a honorable intention to the end all RPM-related headaches. But
despite urpmi being Free Software, it did not find its way into any other
distribution, and even those that were originally derived from Mandrake
(such as Alt Linux or PCLinuxOS) have been quick to replace urpmi with one
of the apt ports for RPM-based distributions. Nevertheless, Mandrake's
effort at making RPMs more digestible and pleasant to use deserves
praise. Here is a quick rundown on the purpose of urpmi, its commands and
functions.
Issuing a urpmi command performs several tasks. Firstly, it checks
whether the relevant package has been installed. Secondly, it determines
whether the package exists in the database of installable packages. Thirdly,
it retrieves all packages, which the package in question depends on, marks
them for installation and presents them to the user for approval. Lastly, it
installs the package from a specified source, such as a CD, another machine
on the local network, or a remote FTP/HTTP server. Besides these basic
functions, urpmi is also capable of upgrading or removing packages,
displaying information about packages and searching the package database. All
of the above can be accomplished either on the command line or in graphical
environment.
This is the list of commands available for manipulating RPM packages under
Mandrake Linux:
- urpmi - installs or upgrades a package
- urpme - removes (erases) a package
- urpmq - searches for a package (both installed and available)
- urpmf - searches for a filename in all known packages (both
installed and available)
- urpmi.addmedia - adds a new source of RPMs to the urpmi database
- urpmi.removemedia - removes an existing package source from the
urpmi database
- urpmi.update - visits all the previously defined sources of RPMs
and updates the package lists if necessary
There are several urpmi configuration files; some of the more important among
them are:
- /etc/urpmi/urpmi.cfg - contains information about all urpmi
sources, including name and path to each source
- /etc/urpmi/skip.list - contains names of packages that will not
be automatically updated
- /etc/urpmi/inst.list - specifies which packages must be installed
rather than updated
- /var/lib/urpmi/list.* - lists all packages available to urpmi
- /var/lib/urpmi/hdlist.* - lists headers of all packages available
to urpmi
- /var/lib/urpmi/synthesis.hdlist.* - contains dependency
information for all available RPM packages
Setting up package sources for retrieval via the Internet is very simple with
Mandrake's graphical configuration tools, but the command line can do the job
equally well. First, let's retrieve the list of sources from urpmi.cfg:
urpmq --list-media
Now we can add new sources from the official Mandrake repositories, as well as
the ever useful PLF repository. This can be accomplished with the following
commands:
urpmi.addmedia main ftp://[...]/mandrake/9.2/i586/Mandrake/RPMS \
with ../base/hdlist.cz
urpmi.addmedia contrib ftp://[...]/mandrake/9.2/i586/Mandrake/RPMS2
urpmi.addmedia jpackage ftp://[...]/mandrake/9.2/i586/Mandrake/RPMS3
urpmi.addmedia --update updates ftp://[...]/mandrake/updates/9.2/RPMS \
with ../base/hdlist.cz
urpmi.addmedia plf ftp://knight.zarb.org/pub/plf/mandrake/9.2 with hdlist.cz
Those who prefer to be on the very bleeding edge of Mandrake development might
want to track the "Cooker", or Mandrake's development branch:
urpmi.addmedia cooker-main \
ftp://[...]/mandrake-devel/cooker/i586/Mandrake/RPMS with ../base/hdlist.cz
urpmi.addmedia cooker-contrib ftp://[...]/mandrake-devel/contrib/i586
Installing a new package or upgrading an existing package is a simple matter
of issuing a urpmi <package_name> command, while uninstalling
is done with a urpme <package_name> command. In cases where
the specified <package_name> doesn't exist, urpmi will attempt to find
a package with a similar name, so even typing errors are taken care of. An
even better option is to install the "bash-completion" package, which is
capable of suggesting package names following the urpmi command and the first
few letters of a package name.
Upgrading an entire Mandrake Linux system can be accomplished with the
following two commands:
urpmi.update -a
urpmi --auto --auto-select
The first of the above commands will get the list of available packages for
upgrade, while the second one will download and upgrade all installed
packages to their latest versions. The RPM packages are downloaded to the
/var/cache/urpmi/rpms directory.
As mentioned earlier, urpmi also provides a set of powerful search commands.
Here are some useful examples:
- urpmq --list - contains information about all urpmi sources,
including name and path to each source
- urpmq -d <package_name> - lists dependencies of
<package_name>
- urpmq -f <package_name> - outputs <package_name>,
inclusive of version and architecture
- urpmq -i <package_name> - outputs useful information about
<package_name>
- urpmq -y <search_string> - searches the package database
for packages that include <search_string>
- urpmf <file_name> - finds the RPM package providing the
specified file <file_name>
It goes without saying that standard rpm commands, such as rpm -qa
can be executed as well. In conjunction with the various urpm* commands,
they provide a powerful set of tools for managing software on Mandrake
Linux.
(
Log in to post comments)