Difference between revisions of "OS-Linux-Tool-Mandriva-Urpmi"
(Copy from PmWiki) |
(Convert markup from PmWiki to MediaWiki with exception of large table.) |
||
Line 1: | Line 1: | ||
− | + | ; See Also : [[OS-Linux]]<br /> | |
− | + | = Package Sources = | |
− | + | <blockquote> | |
− | |||
− | |||
− | |||
− | + | ; See also : <kbd>man urpmi.cfg</kbd> | |
− | : | + | |
− | + | ; A package source is defined in /etc/urpmi/urpmi.cfg, and looks like this<nowiki>:</nowiki> : <div style="background-color: #EEEEEE; border: dashed; border-width: 1px; font-family: courier; margin: 1ex 1en; padding: 1ex; white-space: pre;"><nowiki>name url { | |
− | This is useful for disabling CD media to avoid having to find and load the media. | + | ... list of options, one per line ... |
− | + | }</nowiki></div> | |
− | + | ||
− | $ sudo urpmi.update -a | + | </blockquote> |
+ | |||
+ | = Useful Options = | ||
+ | |||
+ | <blockquote> | ||
+ | |||
+ | ; 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.<div style="background-color: #EEEEEE; border: dashed; border-width: 1px; font-family: courier; margin: 1ex 1en; padding: 1ex; white-space: pre;"><nowiki>$ sudo urpmi.update -a | ||
...retrieving failed: aria2 failed: exited with 4 | ...retrieving failed: aria2 failed: exited with 4 | ||
Line 29: | Line 34: | ||
updated medium... | updated medium... | ||
$ | $ | ||
− | + | </nowiki></div> | |
− | + | ; --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: | |
− | : | + | : <kbd>sudo urpmi --noscripts cnijfilter-common-3.40-1.x86_64.rpm</kbd> |
− | + | == 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: | |
− | :: | + | :: <kbd>rpm -q --scripts cnijfilter-common-3.40-1.x86_64.rpm</kbd> |
− | + | </blockquote> | |
− | + | ||
− | 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. | + | = Tips & Tricks = |
− | + | ||
− | + | <blockquote> | |
− | + | ||
− | + | == 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. | |
− | + | : $ <kbd>sudo vi /var/cache/urpmi/mirrors.cache</kbd> | |
− | + | :: ''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. | To reset the mirror list, simply delete the mirror cache, and retry a urpmi command. | ||
− | + | : $ <kbd>sudo rm -f /var/cache/urpmi/mirrors.cache</kbd> | |
+ | |||
+ | </blockquote> | ||
+ | |||
+ | = Files & Folders = | ||
− | + | <blockquote> | |
(:table bgcolor=#C0C0C0 :) | (:table bgcolor=#C0C0C0 :) | ||
Line 148: | Line 163: | ||
(:cell bgcolor=#CFCFCF :) | (:cell bgcolor=#CFCFCF :) | ||
(:tableend:) | (:tableend:) | ||
+ | |||
+ | </blockquote> | ||
+ | |||
+ | [[Category:OS]] | ||
+ | [[Category:OS-Linux]] |
Revision as of 04:55, 6 February 2018
- See Also
- OS-Linux
Contents
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
(:table bgcolor=#C0C0C0 :) (:head bgcolor=#8F8F8F :)Root (:head bgcolor=#8F8F8F :)Directory Tree (:head bgcolor=#8F8F8F :)Description (:cellnr bgcolor=#CFCFCF rowspan="5" :)/etc/urpmi/ (:cell bgcolor=#CFCFCF :) (:cell bgcolor=#CFCFCF :)urpmi configuration file area (:cellnr:)inst.list (:cell:) (:cellnr bgcolor=#CFCFCF :)skip.list (:cell bgcolor=#CFCFCF :) (:cellnr:)urpmi.cfg (:cell:)Package source configuration file. (:cellnr bgcolor=#CFCFCF :)mediacfg.d/ (:cell bgcolor=#CFCFCF :)...\\ ... (:cellnr rowspan="5" :)/usr/bin/ (:cell:) (:cell:) (:cellnr bgcolor=#CFCFCF :)urpmf (:cell bgcolor=#CFCFCF :) (:cellnr:)urpmi_rpm-find-leaves (:cell:) (:cellnr bgcolor=#CFCFCF :)urpmq (:cell bgcolor=#CFCFCF :) (:cellnr:) (:cell:) (:cellnr bgcolor=#CFCFCF rowspan="3" :)/usr/lib/perl*/vendor_perl/x.y.z/urpm/ (:cell bgcolor=#CFCFCF :) (:cell bgcolor=#CFCFCF :) (:cellnr:)*.pm (:cell:) (:cellnr bgcolor=#CFCFCF :) (:cell bgcolor=#CFCFCF :) (:cellnr rowspan="9" :)/usr/sbin/ (:cell:) (:cell:) (:cellnr bgcolor=#CFCFCF :)rurpme (:cell bgcolor=#CFCFCF :) (:cellnr:)rurpmi (:cell:) (:cellnr bgcolor=#CFCFCF :)urpme (:cell bgcolor=#CFCFCF :) (:cellnr:)urpmi (:cell:) (:cellnr bgcolor=#CFCFCF :)urpmi.addmedia (:cell bgcolor=#CFCFCF :) (:cellnr:)urpmi.removemedia (:cell:) (:cellnr bgcolor=#CFCFCF :)urpmi.update (:cell bgcolor=#CFCFCF :) (:cellnr:) (:cell:) (:cellnr bgcolor=#CFCFCF rowspan="5" :)/usr/share/ (:cell bgcolor=#CFCFCF :) (:cell bgcolor=#CFCFCF :) (:cellnr:)doc/urpmi/ (:cell:) (:cellnr bgcolor=#CFCFCF :)locale/ (:cell bgcolor=#CFCFCF :) (:cellnr:)man/ (:cell:) (:cellnr bgcolor=#CFCFCF :) (:cell bgcolor=#CFCFCF :) (:cellnr rowspan="5" :)/var/cache/urpmi/ (:cell:) (:cell:) (:cellnr bgcolor=#CFCFCF :)headers/ (:cell bgcolor=#CFCFCF :) (:cellnr:)partial/ (:cell:) (:cellnr bgcolor=#CFCFCF :)rpms/ (:cell bgcolor=#CFCFCF :) (:cellnr:) (:cell:) (:cellnr bgcolor=#CFCFCF :)/var/lib/urpmi/ (:cell bgcolor=#CFCFCF :) (:cell bgcolor=#CFCFCF :) (:tableend:)