|
|
Log in / Subscribe / Register

Distributions

News and Editorials

A Quick Reference Guide to urpmi

January 28, 2004

This article was contributed by Ladislav Bodnar

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

Comments (5 posted)

Distribution News

Debian GNU/Linux

The January 27 issue of the Debian Weekly News is out, with looks at preparing for FOSDEM, proposed release process and social contract changes, a public Debian GNU/Hurd system, and several other topics.

DebianPlanet takes a look at the GNOME 2.4 packages that are available for 'sarge'.

Netcraft reports that, according to its surveys, Debian is the fastest-growing Linux distribution among systems serving web sites. Over 440,000 Debian-based servers were counted in January, a 25% increase over last July. The number of Red Hat-based servers actually fell slightly in January.

Martin Michlmayr presents Bits from the DPL with news from Linux.conf.au, the DebConf.org Picture Gallery, and the upcoming DebConf4.

James Troup reports on the migration of 'ftp-master'.

Comments (none posted)

Michael Johnson leaves Red Hat, Fedora

Michael K. Johnson announced on January 23 that he is leaving Red Hat and thus will no longer be the technical lead for the Fedora project. Michael was one of the last remaining Red Hat originals, having been with the company almost since the beginning. He has had a great deal of influence over the development of Red Hat Linux, and will certainly be missed.

The new Fedora leader is Christian Gafton; he has posted an introductory message with his thoughts for Fedora in the near future.

Comments (13 posted)

Fedora Core

The Fedora News Updates #3 takes a look at LinuxWorld, keeping Fedora Core 2 on schedule, the Fedora Core 1 for AMD64 test1 release, and several other topics.

The Fedora News Updates for January 28 is also out. Topics this week include the change in Fedora project leadership, terminology, Fedora Legacy documentation, a writeup of the LinuxWorld Fedora BOF, and more.

Comments (none posted)

State of Fedora Legacy

The Fedora Legacy project aims to provide updates for older Red Hat releases. Click below to see how it's going.

Full Story (comments: none)

Gentoo Linux

The Gentoo Weekly Newsletter for the week of January 26, 2004 is out. This week covers SELinux in Gentoo, and more.

Python 2.3.3 packages are available for Gentoo stable x86. Happy upgrades.

Comments (none posted)

Progeny gets LSB certification

Progeny has announced that its Debian-based "Platform Services Componentized Linux" has received Linux Standard Base 1.3 certification. It thus becomes, Progeny claims, the first LSB-certified Debian-based distribution.

Full Story (comments: none)

Slackware Linux

A look at the slackware-current changelog shows some upgrades to several GNOME packages, Koffice 1.3, rsync 2.6.0, and Samba 3.0.1.

Footnotes reports the release of Dropline GNOME 2.4.2, for Slackware users.

Comments (none posted)

Mandrake Linux

Here are some bug fixes for Mandrake Linux 9.2:
  • This dhcp update fixes a problem where Dynamic DNS updates did not work properly.

  • Here's another qt3 update which fixes problems with using the accelerator keys in KDE applications.

  • This mrproject update fixes a crashing problem.

Comments (none posted)

New Distributions

Deep-Water/Linux

Deep-Water/Linux is a fully graphical minimalist boot CD distribution, featuring the Deep-View file browser. It joins the list at version 0.2.0, released January 26, 2004.

Comments (none posted)

ThinTUX

ThinTUX is a small Linux distribution for thin clients. It has support for all major remote access protocols like ICA, RDP, XDM, telnet, ssh, and more. The distribution can be booted from the network using a network card with PXE-support or from standard media storage devices like floppy, CD, hard disk, or disk-on-chip. The configuration is stored on a DHCP server to simplify terminal management. The initial version of ThinTUX, 0.1, was released January 22, 2004.

Comments (none posted)

Minor distribution updates

2-Disk Xwindow embedded Linux

2-Disk Xwindow embedded Linux has released source code v1.2.6 with major bugfixes. "Changes: Many script cleanups were done to simplify compilation on a wider range of POSIX systems. The documentation was updated. Many size optimizations and bugfixes were made to the desktop system."

Comments (none posted)

BG-Rescue Linux

BG-Rescue Linux has released v0.3.0 with major feature enhancements. "Changes: This release adds Linux 2.4.24 with support for the new NTFS 2.1.6a driver. It updates uClibc to 0.9.24, BusyBox to 1.0pre5, and some of the other included programs. ntfsprogs 1.8.3 and syslinux 2.08 have been added. Support for the Xircom 16-bit PCMCIA network device has been added, and some unused kernel options removed."

Comments (none posted)

MURIX Linux

MURIX Linux has released v2004-01-26 with major feature enhancements. "Changes: This version includes Linux kernel 2.6.x and all of the associated necessary updates."

Comments (none posted)

PLD RescueCD

PLD RescueCD has released v1.92 with major bugfixes. "Changes: The boot process and hardware detection were improved. This release requires an i386 PC with only 16 MB of RAM. Booting from IDE, SCSI, USB CD-ROM, or disk was implemented. The kernel was updated to 2.4.25pre6 with the nForce kernel nvnet module. 25 packages were updated in this release. USB keyboard support and a debug mode have been added. USB modules detection and the serial console have been fixed."

Comments (none posted)

Distribution reviews

Spawn of Debian faceoff: LibraNet 2.8.1 (Linux.com)

This installment of the 'Spawn of Debian' series looks at LibraNet v2.8.1. "With the packages finally loaded, all that was left to do was to configure the sound, network connection, and printers. Sound was easy. The installer determined that I should have the Trident driver, loaded it, and it worked. The network configuration was almost that easy. I just had to select the type of configure I wanted to do (ppp, network, or expert), specify the type of network (static, dynamic, pppoe), choose whether or not to send the hostname when signing on, and enter the IP addresses of the nameservers. That last one had me worried for a second, but it shouldn't have. All it wanted was the local address of the Belkins router (192.168.2.1). And it even prompted me to use that."

Comments (none posted)

Linux on Mac: a POWER programmer's primer (IBM developerWorks)

IBM developerWorks looks at Linux on the PowerPC. "For this article, I installed and evaluated four distributions of Linux for PowerPC machines: Debian, Knoppix, Yellow Dog, and Mandrake. All were installed and tested on a G4 iMac. I found two of the distributions to be well polished and easy to use, right on par with the best x86 Linux distributions; the other two I would have to describe as "not ready yet.""

Comments (none posted)

Review: Mandrake Linux 9.2 AMD64 Release (PCBurn)

This PCBurn author was not impressed with Mandrake's AMD64 release. "The first thing that hit me when I booted the AMD64 Mandrake Linux 9.2 CD was the fact that it uses a 2.4 series kernel. I know some of you are already groaning or rationalizing that the 2.4 kernel would obviously be the most stable and tested kernel series since 2.6.1 has only been recently released and there are still many bugs yet to be fixed. If this was a distribution for x86, I might be inclined to agree with you, but for an AMD64 box this just isn't so. The 2.4 kernel series is being deprecated for AMD64, and as of 2.4.23-pre7 the kernel has devfs support disabled completely for x86-64 due to it causing memory corruption of all things. Nobody is going to fix this problem or any of the others that currently exist in 2.4, so any distribution making use of it must provide their own patches and fixes if they want to continue using this kernel. There certainly won't be any official backports of the drivers and AMD64 fixes currently available in 2.6, such as support for the nForce3 chipset."

Comments (2 posted)

Review: Xandros Desktop OS 2.0 (eWeek)

eWeek reviews Xandros Desktop OS 2.0. "IT managers serious about making the switch from Windows have nothing to fear regarding Xandros' ability to integrate into a Windows- centric computing environment. Xandros is based on Debian GNU/Linux. Version 2.0 employs a Xandros-enhanced KDE 3.1.4 interface and an underlying 2.4.22 Linux kernel, which makes for an elegant, intuitive interface -- and a look and feel that will likely be familiar to most Windows users."

Comments (none posted)

Page editor: Rebecca Sobol
Next page: Development>>


Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds