urpmi.addmedia - adds a new rpm media to be used by urpmi
urpmi.addmedia [options] <name> <url> [with <hdlist>]
urpmi.addmedia is used to add a new media to be used by urpmi, so it can find new rpms at the specified location. Currently supported media types are: local drives, removable drives (such as CDs), and networked media via different protocols (http, ftp, ssh and rsync). One of the following modes must be chosen:
where <name> is a human-readable name for the new media (e.g. "updates"). <name> is optional if --distrib is given in the options list. <host>/<path> is the location of the media directory on the net (e.g. media/main). <relative path of hdlist> is the pathname where to find the hdlist of the rpms. The location is given relative to <path>. curl is used by default to download files, wget may be used if curl is not installed or if or --wget is given in options. Example:
media/main
urpmi.addmedia http http://jpackage.sf.net/rpm/free with hdlist.cz ftp:
The same as for http. Add your login and password if required (note that you don't need to specify anonymous as login for anonymous access ftp servers). If wget is used to download files with a firewall you may have to ensure that the passive_ftp option is on in /etc/wgetrc (that's usually the default). Example:
urpmi.addmedia ftp ftp://a:a@leia//export/media/main with media_info/hdlist.cz
The same as for http and ftp; add your login and password if required. You may want to export the public key in order not to have to type your password. rsync over an ssh connection will be used to get files. urpmi will try to re-use the same ssh connection over multiple invocations.
Example:
urpmi.addmedia -h ssh ssh://fpons@bi/c/i586/media/main
The same as for http; you can use the <host>::<path> syntax too. Example:
urpmi.addmedia rsync rsync://ftp.orst.edu::mandrake-devel/contrib/ppc with ../../cooker/ppc/media/media_info/hdlist2.cz
where <name> is a human-readable name for the new media (e.g. "local updates"). <path> is the location of the media directory on your machine (e.g. media/main).
<path> is the location of the media directory on your machine when the removable device is mounted. This works for removable drives, but also for ISO images mounted on a loop device. urpmi will then be able to re-mount the ISO image to the specified path (but the ISO image must be mounted when you run urpmi.addmedia).
urpmi.addmedia
Use wget only for downloading distant files. By default curl is used if available.
Use curl only for downloading distant files. This is the default if curl is available.
Specify additional command-line options to be passed to curl, rsync or wget when retrieving files. If several options are to be passed, separate them with spaces and enclose them in quotes.
Note that the rsync options will also be used for ssh media.
Try to limit the download speed, rate is given in bytes/sec. This option is not active by default.
Use specified HTTP proxy.
Use specified user and password to use for proxy authentication. Specifying --proxy-user=ask will cause urpmi.addmedia to prompt for a username and a password.
Adds a media which will be taken into account by MandrivaUpdate or by urpmi --update when looking for updates.
urpmi --update
Try to find and use synthesis file if with ... is not given.
Try to find and use hdlist file if with ... is not given.
Do not try to find any synthesis or hdlist file.
So, if you use a network media (http, ftp, etc.), specifying the location of a synthesis or hdlist with with... is mandatory.
On the other hand, if you use a local media urpmi.addmedia will extract all RPM headers and construct an hdlist by itself.
Retrieve a set of media from a distribution. Typically, the URL provided to urpmi.addmedia will represent the parent directory of a directory media, which in turn will contain various subdirectories for each medium of the distribution. <name> is combined with medium names found to create newer medium names in the urpmi database. The with ... option, is not necessary, as hdlists found on the installation medium are used instead automatically.
Use specified URL for list of mirrors. The default is taken from the file /etc/urpmi/mirror.config, or http://www.mandrivalinux.com/mirrorsfull.list if this file doesn't exist.
Creates a virtual medium. This only works for file:// and removable:// protocols, and no files will be created in /var/lib/urpmi. The medium is always up-to-date and so it does not need to be updated by urpmi.update.
file://
removable://
urpmi.update
Don't try to rebuild the hdlist files from the RPMs if the original hdlist wasn't readable or was corrupted (which is the default behaviour). For non local media, rebuilding the hdlists can be very time- and bandwidth-consuming.
Add the new media in the urpmi configuration file, but don't update it nor proceed to any download. The media, to be usable, will need to be updated with urpmi.update; it's ignored until then.
Don't import pubkey of added media.
Clean headers cache directory in /var/cache/urpmi/headers.
Force rebuild of base files, or of hdlist files when specified twice.
Beginning with urpmi 4.6.16, you can use variables in media URLs (for example /mnt/mirror/$RELEASE/$ARCH/media/main). The variables supported so far are:
The architecture (if found in /etc/release).
The OS release (if found in /etc/release; its value should be cooker on a Mandriva cooker system.)
The canonical hostname of the machine urpmi runs on.
urpmi(8), urpmi.update(8), urpmi.removemedia(8), urpmf(8), urpmq(8), urpmi.files(5).
Pascal Rigaux (original author), François Pons, Rafael Garcia-Suarez, <rgarciasuarez@mandriva.com> (current maintainer)
To install urpm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm urpm
CPAN shell
perl -MCPAN -e shell install urpm
For more information on module installation, please visit the detailed CPAN module installation guide.