Difference between revisions of "OS-Linux-Tool-Mandriva-Urpmi"

From KRayWiki
Jump to navigation Jump to search
(Convert markup from PmWiki to MediaWiki with exception of large table.)
(Convert table markup from PmWiki to MediaWiki)
 
Line 84: Line 84:
 
<blockquote>
 
<blockquote>
  
(:table bgcolor=#C0C0C0 :)
+
{| bgcolor=#C0C0C0 :)
(:head bgcolor=#8F8F8F :)Root
+
! bgcolor=#8F8F8F | Root
(:head bgcolor=#8F8F8F :)Directory&nbsp;Tree&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+
! bgcolor=#8F8F8F | Directory&nbsp;Tree&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(:head bgcolor=#8F8F8F :)Description
+
! bgcolor=#8F8F8F | Description
(:cellnr bgcolor=#CFCFCF rowspan="5" :)/etc/urpmi/
+
|-
(:cell bgcolor=#CFCFCF :)
+
| bgcolor=#CFCFCF rowspan="5" | /etc/urpmi/
(:cell bgcolor=#CFCFCF :)urpmi configuration file area
+
| bgcolor=#CFCFCF |
(:cellnr:)inst.list
+
| bgcolor=#CFCFCF | urpmi configuration file area
(:cell:)
+
|-
(:cellnr bgcolor=#CFCFCF :)skip.list
+
| inst.list
(:cell bgcolor=#CFCFCF :)
+
|
(:cellnr:)urpmi.cfg
+
|-
(:cell:)Package source configuration file.
+
| bgcolor=#CFCFCF | skip.list
(:cellnr bgcolor=#CFCFCF :)mediacfg.d/
+
| bgcolor=#CFCFCF |
(:cell bgcolor=#CFCFCF :)...\\
+
|-
...
+
| urpmi.cfg
(:cellnr rowspan="5" :)/usr/bin/
+
| Package source configuration file.
(:cell:)&nbsp;
+
|-
(:cell:)
+
| bgcolor=#CFCFCF | mediacfg.d/
(:cellnr bgcolor=#CFCFCF :)urpmf
+
| bgcolor=#CFCFCF | ...<br />...
(:cell bgcolor=#CFCFCF :)
+
|-
(:cellnr:)urpmi_rpm-find-leaves
+
| rowspan="5" | /usr/bin/
(:cell:)
+
| &nbsp;
(:cellnr bgcolor=#CFCFCF :)urpmq
+
|
(:cell bgcolor=#CFCFCF :)
+
|-
(:cellnr:)
+
| bgcolor=#CFCFCF | urpmf
(:cell:)&nbsp;
+
| bgcolor=#CFCFCF |
(:cellnr bgcolor=#CFCFCF rowspan="3" :)/usr/lib/perl*/vendor_perl/x.y.z/urpm/
+
|-
(:cell bgcolor=#CFCFCF :)&nbsp;
+
| urpmi_rpm-find-leaves
(:cell bgcolor=#CFCFCF :)
+
|
(:cellnr:)*.pm
+
|-
(:cell:)
+
| bgcolor=#CFCFCF | urpmq
(:cellnr bgcolor=#CFCFCF :)
+
| bgcolor=#CFCFCF |
(:cell bgcolor=#CFCFCF :)&nbsp;
+
|-
(:cellnr rowspan="9" :)/usr/sbin/
+
| &nbsp;
(:cell:)&nbsp;
+
|-
(:cell:)
+
| bgcolor=#CFCFCF rowspan="3" | /usr/lib/perl*/vendor_perl/x.y.z/urpm/
(:cellnr bgcolor=#CFCFCF :)rurpme
+
| bgcolor=#CFCFCF | &nbsp;
(:cell bgcolor=#CFCFCF :)
+
| bgcolor=#CFCFCF |
(:cellnr:)rurpmi
+
|-
(:cell:)
+
| *.pm
(:cellnr bgcolor=#CFCFCF :)urpme
+
|
(:cell bgcolor=#CFCFCF :)
+
|-
(:cellnr:)urpmi
+
| bgcolor=#CFCFCF |
(:cell:)
+
| bgcolor=#CFCFCF | &nbsp;
(:cellnr bgcolor=#CFCFCF :)urpmi.addmedia
+
|-
(:cell bgcolor=#CFCFCF :)
+
| rowspan="9" | /usr/sbin/
(:cellnr:)urpmi.removemedia
+
| &nbsp;
(:cell:)
+
|
(:cellnr bgcolor=#CFCFCF :)urpmi.update
+
|-
(:cell bgcolor=#CFCFCF :)
+
| bgcolor=#CFCFCF | rurpme
(:cellnr:)
+
| bgcolor=#CFCFCF |
(:cell:)&nbsp;
+
|-
(:cellnr bgcolor=#CFCFCF rowspan="5" :)/usr/share/
+
| rurpmi
(:cell bgcolor=#CFCFCF :)&nbsp;
+
|
(:cell bgcolor=#CFCFCF :)
+
|-
(:cellnr:)doc/urpmi/
+
| bgcolor=#CFCFCF | urpme
(:cell:)
+
| bgcolor=#CFCFCF |
(:cellnr bgcolor=#CFCFCF :)locale/
+
|-
(:cell bgcolor=#CFCFCF :)
+
| urpmi
(:cellnr:)man/
+
|
(:cell:)
+
|-
(:cellnr bgcolor=#CFCFCF :)&nbsp;
+
| bgcolor=#CFCFCF | urpmi.addmedia
(:cell bgcolor=#CFCFCF :)
+
| bgcolor=#CFCFCF |
(:cellnr rowspan="5" :)/var/cache/urpmi/
+
|-
(:cell:)&nbsp;
+
| urpmi.removemedia
(:cell:)
+
|
(:cellnr bgcolor=#CFCFCF :)headers/
+
|-
(:cell bgcolor=#CFCFCF :)
+
| bgcolor=#CFCFCF | urpmi.update
(:cellnr:)partial/
+
| bgcolor=#CFCFCF |
(:cell:)
+
|-
(:cellnr bgcolor=#CFCFCF :)rpms/
+
| &nbsp;
(:cell bgcolor=#CFCFCF :)
+
|-
(:cellnr:)
+
| bgcolor=#CFCFCF rowspan="5" | /usr/share/
(:cell:)&nbsp;
+
| bgcolor=#CFCFCF | &nbsp;
(:cellnr bgcolor=#CFCFCF :)/var/lib/urpmi/
+
| bgcolor=#CFCFCF |
(:cell bgcolor=#CFCFCF :)&nbsp;
+
|-
(:cell bgcolor=#CFCFCF :)
+
| doc/urpmi/
(:tableend:)
+
|
 +
|-
 +
| bgcolor=#CFCFCF | locale/
 +
| bgcolor=#CFCFCF |
 +
|-
 +
| man/
 +
|
 +
|-
 +
| bgcolor=#CFCFCF | &nbsp;
 +
| bgcolor=#CFCFCF |
 +
|-
 +
| rowspan="5" | /var/cache/urpmi/
 +
| &nbsp;
 +
|
 +
|-
 +
| bgcolor=#CFCFCF | headers/
 +
| bgcolor=#CFCFCF |
 +
|-
 +
| partial/
 +
|
 +
|-
 +
| bgcolor=#CFCFCF | rpms/
 +
| bgcolor=#CFCFCF |
 +
|-
 +
| &nbsp;
 +
|-
 +
| bgcolor=#CFCFCF | /var/lib/urpmi/
 +
| bgcolor=#CFCFCF | &nbsp;
 +
| bgcolor=#CFCFCF |
 +
|}
  
 
</blockquote>
 
</blockquote>

Latest revision as of 05:08, 6 February 2018

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/