<< Février >>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
       
<< 2010 >>
FAQ/HOWTO
04/01/2006 : Comment utiliser urpmi --parallel
09/03/2005 : Comment installer plusieurs distributions
07/07/2004 : Introduction à Linux
07/07/2004 : Gestion des logiciels ( tar.gz, rpm et urpmi )
07/07/2004 : Comment installer le pilote NForce ?

Linux Wizard - HOWTO add easily officials and third parties repos

Mandriva : HOWTO add easily officials and third parties repos16/04/2008 20:38:59
Mandriva 2008 Spring gems #1 : urpmi.addmedia --mirrorlist

This is maybe one of the most useful feature in the new Mandriva 2008.1 Spring : the ability to automatically officials or third parties repos in CLI with urpmi.addmedia. Indeed, previously users were using websites like Easyurpmi to add officials Mandriva mirrors, but also to add third parties mirrors like PLF. Whereas the Mandriva Media manager, drakrpm-edit-media, was allowing to add easily and automatically Mandriva officials repositories, it was impossible to do it for third parties repositories. On top of that it means that when using CLI only, you add to enter very complicated urpmi.addmedia commands.

Since Mandriva 2008.1 Spring, a new option have been added which allow to add mirrors from a list. With this option, urpmi.addmedia will try to add the nearest mirror. The only thing needed is a server giving the list of mirrors in a format compatible for urpmi.addmedia. This feature has been developed based on ideas from bug #29161. A new option --mirrorlist, and a new special variable $MIRRORLIST have been introduced. Let's see how to use them !

  • Add all Mandriva official medias for your distribution version : This command will add all Mandriva officials medias for your current distribution version and architecture. $MIRRORLIST variable is used :urpmi.addmedia --distrib --mirrorlist '$MIRRORLIST'
  • Add all Mandriva official medias for your distribution version ( the long way ) : This command will be equivalent to the previous except that we will give manually the url of the server hosting the list of mirrors. Distribution version and architecture will be guessed automatically from $RELEASE and $ARCH variables : urpmi.addmedia --distrib --mirrorlist http://api.mandriva.com/mirrors/basic.'$RELEASE'.'$ARCH'.list
  • Add all Mandriva official medias for your distribution version ( the manual way ) : This command is equivalent to the previous ones, except that we will define manually the distribution version and architecture. For a 32 bits version of 2008.1 Spring, this will give you : urpmi.addmedia --distrib --mirrorlist http://api.mandriva.com/mirrors/basic.2008.1.i586.list
    If you are a 64bits user, you will replace i586 by x86_64
  • Adding PLF repositories : Here is the command to add PLF Free and PLF Non-free medias for your distribution version and architecture : urpmi.addmedia --distrib --mirrorlist http://plf.zarb.org/mirrors/'$RELEASE'.'$ARCH'.list
  • Adding Cooker Official medias ( to be used by cooker users and Mandriva contributors ) : This command will add all Cooker's medias for your distribution architecture : urpmi.addmedia --distrib --mirrorlist http://api.mandriva.com/mirrors/cooker.'$ARCH'.list
As you can see, it's way easier to add the medias from CLI. As everything is done automatically, it's also easier to script urpmi medias addition. One of the direct benefit is the fact that the Mandriva 2008 Spring One will add automatically the official Mandriva repositories at the end of the installation on the hard disk if the system is detecting an internet connection. So directly atfer the installation, all Mandriva packages are directly available !
Please note that you can add only some specific media like for example main/release, or main/backports. For further informations, please have a look at urpmi.addmedia manpage.

new comment 1 comment (s)  
Bookmark and Share
FACORAT Fabrice