Wednesday, December 14, 2005

Updating Packages in Mandrake 9.2 (FiveStar) for i586

Quick-setup of urpmi
______________________


The best way to do Install/Upgrade a Package in Mandy is by using URPMI

urpmi - This is the command line package management tool used in Madriva Linux.

What it does ?
Suppose if you want to install a particular package what you do is go to the Package 's download page and start downloading the RPM and then try to install it.

You may also face problems like installing dependencies while you go by the above procedure.

So to avoid this the best way to Install a package is by using URPMI it takes care of all the dependencies required by the package.

By default you have urpmi installed with the mandrake.

Lets look at how we configure urpmi :

Config file for urpmi
/etc/urpmi/urpmi.cfg

The first time you look at this file it will show you that this will use the CD media to fetch the Package.

Since we need the web to be used to fetch the package we need:

[root@sriram root]# urpmi.removemedia -a
This will remove the entries made in urpmi.cfg

Now we will setup the urpmi using Easyurpmi web-based tool.

Once you visit the below url :

http://easyurpmi.zarb.org/

you will need to information that suits you

I selected the following

: and : and

2) Select a mirror for each source you want

Always select main, it is needed for all other media.
A few plf packages need contrib, therefore you should add contrib if you add plf.

Restrict your selection to sources you really need, since sources may conflict - It is not my fault.





3) Type this in a console as root

[root@mybox sriram]#urpmi.addmedia main ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/i586/Mandrake/RPMS/ with ../base/hdlist.cz

[root@mybox sriram]#urpmi.addmedia contrib ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/contrib/i586/ with ../../i586/Mandrake/base/hdlist2.cz

Both these commands will take 20 minutes to update.

[root@mybox conf]# cat /etc/urpmi/urpmi.cfg
main ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/i586/Mandrake/RPMS {
hdlist: hdlist.main.cz
with_hdlist: ../base/hdlist.cz
key-ids: 70771ff3
}

contrib ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/contrib/i586 {
hdlist: hdlist.contrib.cz
with_hdlist: ../../i586/Mandrake/base/hdlist2.cz
list: list.contrib
key-ids: 70771ff3
}

[root@mybox conf]#

[root@mybox conf]# urpmi postgresql
To satisfy dependencies, the following packages are going to be installed (2 MB):
postgresql-7.3.4-2mdk.i586
sfio-1999-9mdk.i586
Is this OK? (Y/n) y

medium "contrib" uses an invalid list file:
mirror is probably not up-to-date, trying to use alternate method

ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/i586/Mandrake/RPMS/sfio-1999-9mdk.i586.rpm
ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/i586/Mandrake/RPMS/postgresql-7.3.4-2mdk.i586.rpm
installing /var/cache/urpmi/rpms/postgresql-7.3.4-2mdk.i586.rpm /var/cache/urpmi/rpms/sfio-1999-9mdk.i586.rpm
Preparing... ##################################################
1:sfio ##################################################
2:postgresql ##################################################
[root@mybox conf]#


1 comment:

Sriram S said...

[root@mybox urpmi]# cat urpmi.cfg
main ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/i586/Mandrake/RPMS {
hdlist: hdlist.main.cz
with_hdlist: ../base/hdlist.cz
key-ids: 70771ff3
}

contrib ftp://ftp.is.co.za/mirror/mandrivalinux/official/9.2/contrib/i586 {
hdlist: hdlist.contrib.cz
with_hdlist: ../../i586/Mandrake/base/hdlist2.cz
list: list.contrib
key-ids: 70771ff3
}