OS-Linux-Tool-Mandriva-Urpmi

From KRayWiki
Jump to: navigation, search
See Also 
OS-Linux

Package Sources

See also 
man urpmi.cfg
A package source is defined in /etc/urpmi/urpmi.cfg, and looks like this: 
name url {    ... list of options, one per line ... }

Useful Options

ignore 
Do not use the source when running `urpmi`.
This is useful for disabling CD media to avoid having to find and load the media.
--downloader wget 
Sometimes useful for correcting download faults.
$ sudo urpmi.update -a ...retrieving failed: aria2 failed: exited with 4 ...retrieving failed: aria2 failed: exited with 4 $ sudo uprmi.update --downloader wget --wget-options '-c' -a trying again with mirror... trying again with mirror... trying again with mirror... ...retrieving failed: wget failed: exited with 8 trying again with mirror... ... updated medium... $
--noscripts 
Once upon a time, a Canon-supplied printer driver package for an MG-6120 contained an RPM that, when installed, mysteriously left the system without some key binaries populated (rpm -V showed missing files). Apparently, the RPM contained a broken %postinstall script. Though the package didn't work when installed with a normal urpmi command, it did install ok with:
sudo urpmi --noscripts cnijfilter-common-3.40-1.x86_64.rpm

Sometimes, it is helpful to use rpm instead...

--scripts 
Once upon a time, a Canon-supplied printer driver package contained an RPM that mysteriously failed to install some of the files in its payload. It turned out that the RPM had a @postinstall script that was deleting them! Pray tell, how might one view the scripts in the RPM? urpmi doesn't support --scripts'. rpm does. How about this for an example:
rpm -q --scripts cnijfilter-common-3.40-1.x86_64.rpm

Tips & Tricks

Forcing use of a different mirror or "blacklisting" a mirror

Occasionally a mirror will fail to be useful (too slow, aborts during download, etc). Unfortunately urpmi seems to want to use the same mirror it has used in the past. To force use of a different mirror, the following may prove helpful. It worked for the author on 2011/11/13.

$ sudo vi /var/cache/urpmi/mirrors.cache
Note the 'chosen' mirror in the MIRRORLIST data structure.
For example: 'chosen' => 'ftp://distro.ibiblio.org/pub/linux/distributions/mageia/distrib/1/i586',
Presuming that this is the offending server, delete the 'chosen' value:
For example: 'chosen' => ,
Find the 'list' entry for the offending server
For example:
'list' => [
{
'country' => 'US',
.
.
.
'url' => 'ftp://distro.ibiblio.org/pub/linux/distributions/mageia/distrib/1/i586',
.
.
.
},
Delete the entry for the offending mirror. The entry begins with the { line and ends with the }, line.

To reset the mirror list, simply delete the mirror cache, and retry a urpmi command.

$ sudo rm -f /var/cache/urpmi/mirrors.cache

Files & Folders

Root Directory Tree          Description
/etc/urpmi/ urpmi configuration file area
inst.list
skip.list
urpmi.cfg Package source configuration file.
mediacfg.d/ ...
...
/usr/bin/  
urpmf
urpmi_rpm-find-leaves
urpmq
 
/usr/lib/perl*/vendor_perl/x.y.z/urpm/  
*.pm
 
/usr/sbin/  
rurpme
rurpmi
urpme
urpmi
urpmi.addmedia
urpmi.removemedia
urpmi.update
 
/usr/share/  
doc/urpmi/
locale/
man/
 
/var/cache/urpmi/  
headers/
partial/
rpms/
 
/var/lib/urpmi/