This document addresses solutions/work-arounds to some
of the problems I (Kevin Masaryk) have encountered while using 'rpmdrake'
(aka 'Software Manager').
'rpmdrake' is a package management tool for working
with RPM files. It is actually just a GUI front-end to 'urpmi'. 'urpmi' is
the engine which 'rpmdrake' depends upon.
The only documentation available for 'rpmdrake' lies
within the
Mandrake Users Guide. There is no man page for 'rpmdrake'.
*Note concerning all problems: the operation of 'rpmdrake'
doesn't appear to be consistent between each execution; what I mean is that
it doesn't always act the same way or present the same data each time it
is run. Many of the problems encountered with rpmdrake can be resolved by
simply exiting and restarting the program.
Also, you will need to be logged in as 'root' to perform
most of the solutions presented here.
section index top
For obvious reasons, this is the most severe, and annoying,
problem with rpmdrake. This problem has been known to occur even after a
new installation of Linux-Mandrake.
The first thing to check is that the rpm database of
what's installed on your system is intact. An easy way to do this is to try
using 'gnorpm' or something similar.
In the unlikely event that you can't find any packages which are currently
installed on your system in 'gnorpm', then your RPM database is probably corrupted
or missing and needs to be rebuilt. Check the man page for 'rpm' (man
rpm) to see how to do this ... or, if you're lazy: it's done with this
command
rpm --rebuilddb
Next, browse the man pages for 'urpmi' to get an idea
of how it works. The following is a list of 'urpmi's configuration files,
with their descriptions, taken straight from the urpmi(8) man page (edited
for grammar):
-
'/usr/bin/urpmi'
The urpmi executable (Perl script).
-
'/var/lib/urpmi/list.*'
Contains the list of all packages known by urpmi and their location.
There is one file list per media(*).
-
'/var/lib/urpmi/hdlist.*'
Contains information about all known packages; it's a summary of rpm headers.
There is one file list per media(*).
-
'/etc/urpmi/urpmi.cfg'
Contains one line "name" "url" per media.
-
'/var/lib/urpmi/depslist.ordered
A simple text file containing all dependencies of all known packages.
-
'/var/lib/urpmi/provides'
A simple text file containing all provides and the list of associated packages
which contain the provides.
-
'/var/lib/urpmi/compss'
A simple text file containing the list of packages for each Group used.
Have a look at the '/var/lib/urpmi' directory. You shouldn't
have any 'hdlist.*' files. If you do, use
urpmi.removemedia
to remove the media or use the brute-force method and
just delete them (not recommended).
Example:
urpmi.removemedia cdrom1
Next, have a look at the '/etc/urpmi/urpmi.cfg' file.
This file should either be empty (since you've lost all your media) or every
line should be commented out (i.e. has a '#' sign in front of it).
Since we want to start clean, use an editor and delete all duplicate lines
in this file. Hopefully, you'll be left with a few commented-out lines relating
to the original installation CDs which you got with Mandrake.
Here's what a 'normal' urpmi.cfg file should look like for a Mandrake 7.2
Complete installation (plus an FTP media I created):
cdrom1 removable_cdrom_0://mnt/cdrom/Mandrake/RPMS
cdrom2 removable_cdrom_1://mnt/cdrom/Mandrake/RPMS2
cdrom3 removable_cdrom_2://mnt/cdrom/RPMS3
cdrom4 removable_cdrom_3://mnt/cdrom/RPMS4
ftp_depot file://home/ftp/RPM_depot/
Now use 'urpmi.addmedia' to add media. Here's an example:
-
Put CD1 of Mandrake Linux in your CDROM drive.
-
Type
urpmi.addmedia removable_cdrom_0://mnt/cdrom/Mandrake/RPMS
(That's one line) * Again, if this doesn't
work, the brute-force method is just to add the lines in manually and then
use urpmi.updatename.
After adding all of your media, you should be able to
start 'rpmdrake' and have everything back to normal...hopefully ;-).
section index top
You'll find the RPMs you've just added via the new media
in the Package Groups window on the left. A search for the new RPM(s) will
return false until you restart 'rpmdrake'.
section index top
If you go to User->Preferences->Add media(button)
and select CDROM as the "Type of media," you are only able to select the
name of the CD and a "CDROM number" identifier.
This may prevent you from using non Mandrake distribution CDROMs with RPMs
on them, such as Red Hat CDs. The reason is that urpmi needs to know the
exact directory which contains the RPMs and 'rpmdrake' may or may not report
the location properly. Your options are to either: select "Local" as the
"Type of media" and enter the full path to the RPM dir, or add the media
with 'urpmi.addmedia' (best choice).
The following is a list of the CDs distributed with Mandrake 7.2 Complete
and the location of the RPM dirs on them (relative from mount directory):
- CDROM1 Installation: 'Mandrake/RPMS/'
- CDROM2 Extension: 'Mandrake/RPMS2/'
- CDROM3 1st Application: 'RPMS3/'
- CDROM4 2nd Application: 'RPMS4/'
Here's how we'd add CD1 with 'urpmi.addmedia':
urpmi.addmedia removable_cdrom_0://mnt/cdrom/Mandrake/RPMS
section index top
Try checking your '/etc/urpmi/urpmi.cfg' file for duplicate
entries. If you find any, make sure they're commented ('#') out. Additionally,
you'll probably need to use 'urpmi.removemedia' to remove the duplicate media
offender and 'urpmi.addmedia' to re-add the media.
section index top
|