I do what I can

Random thoughts from Mauricio Teixeira…

Interesting comparison of dependency handling with "smart"

leave a comment »

This message was on the cooker mailing list, and I thought it was interesting to cite here, since it gives another idea of what’s coming with the Smart Package Manager. The discussion started about how urpmi handles the RPM Requires(post).

On Fri, Aug 19, 2005 at 03:11:00PM +0300, Andreas Hasenack wrote:

This is a real bug in rpm, and a bad one. Ordering packages for installation is
very important.

I have a similar behaviour with the kolab packages. There are these
three:
– kolab (requires the two below)
– kolab-webadmin (Requires(pre): kolab)
– kolab-resource-handlers (Requires(pre): kolab)

Below I have 3 cases: rpm, smart and urpmi. All installing these 3 rpms.

Due to these requirements, correct ordering dictates that kolab be
installed first. It’s what happens when I use smart to install these
rpms, for example, but rpm itself isn’t doing it. Look at the order
(and the error I get due to this incorrect ordering):

# rpm -Uvh kolab-resource-handlers/RPMS/noarch/kolab-resource-handlers-0.4.1-0.20050811.1mdk.noarch.rpm kolab/RPMS/i586/kolab-1.9.5-0.20050801.1mdk.i586.rpm kolab-webadmin/RPMS/noarch/kolab-webadmin-0.4.9-0.20050812.1mdk.noarch.rpm
Preparing… ########################################### [100%]
1:kolab-resource-handlerswarning: user kolab does not exist – using root1%)
warning: group kolab does not exist – using root
warning: user kolab does not exist – using root
warning: group kolab does not exist – using root
########################################### [ 33%]
Adding user apache to group kolab
Adding user cyrus to group kolab
Adding user postfix to group kolab
Adding user ldap to group kolab
2:kolab ########################################### [ 67%]
3:kolab-webadmin

See who got installed first? kolab-resource-handlers, that is, the
“Requires(pre): kolab” it has wasn’t obeyed.

smart installs them in the correct order:

# smart install kolab-resource-handlers/RPMS/noarch/kolab-resource-handlers-0.4.1-0.20050811.1mdk.noarch.rpm kolab/RPMS/i586/kolab-1.9.5-0.20050801.1mdk.i586.rpm kolab-webadmin/RPMS/noarch/kolab-webadmin-0.4.9-0.20050812.1mdk.noarch.rpm
(…)
Preparing… ##################################################################################### [ 0%]
Output from kolab-1.9.5-0.20050801.1mdk@i586:
Adding user apache to group kolab
Adding user cyrus to group kolab
Adding user postfix to group kolab
Adding user ldap to group kolab
1:Installing kolab ##################################################################################### [ 33%]
2:Installing kolab-resource-handlers ##################################################################################### [ 66%]
3:Installing kolab-webadmin ##################################################################################### [100%]

urpmi happens to work, but it doesn’t obey the kolab-webadmin Requires(pre): kolab
restriction:

# urpmi kolab-resource-handlers/RPMS/noarch/kolab-resource-handlers-0.4.1-0.20050811.1mdk.noarch.rpm kolab/RPMS/i586/kolab-1.9.5-0.20050801.1mdk.i586.rpm kolab-webadmin/RPMS/noarch/kolab-webadmin-0.4.9-0.20050812.1mdk.noarch.rpm

installing kolab-webadmin/RPMS/noarch/kolab-webadmin-0.4.9-0.20050812.1mdk.noarch.rpm kolab/RPMS/i586/kolab-1.9.5-0.20050801.1mdk.i586.rpm kolab-resource-handlers/RPMS/noarch/kolab-resource-handlers-0.4.1-0.20050811.1mdk.noarch.rpm
Preparing… #############################################
1/3: kolab-webadmin #############################################
Adding user apache to group kolab
Adding user cyrus to group kolab
Adding user postfix to group kolab
Adding user ldap to group kolab
2/3: kolab #############################################
3/3: kolab-resource-handlers#############################################

After that, there is another observation:

On Fri, Aug 19, 2005 at 03:19:00PM +0300, Andreas Hasenack wrote:

Actually, it was pure luck. urpmi also doesn’t do proper ordering. All I
had to do was change the order in the command line:

# urpmi kolab/RPMS/i586/kolab-1.9.5-0.20050801.1mdk.i586.rpm kolab-webadmin/RPMS/noarch/kolab-webadmin-0.4.9-0.20050812.1mdk.noarch.rpm kolab-resource-handlers/RPMS/noarch/kolab-resource-handlers-0.4.1-0.20050811.1mdk.noarch.rpm

installing kolab-resource-handlers/RPMS/noarch/kolab-resource-handlers-0.4.1-0.20050811.1mdk.noarch.rpm kolab-webadmin/RPMS/noarch/kolab-webadmin-0.4.9-0.20050812.1mdk.noarch.rpm kolab/RPMS/i586/kolab-1.9.5-0.20050801.1mdk.i586.rpm
Preparing… #############################################
1/3: kolab-resource-handlers##############warning: user kolab does not exist – using root
warning: group kolab does not exist – using root
warning: user kolab does not exist – using root
warning: group kolab does not exist – using root
###############################
Adding user apache to group kolab
Adding user cyrus to group kolab
Adding user postfix to group kolab
Adding user ldap to group kolab
2/3: kolab #############################################
3/3: kolab-webadmin #############################################

bang!
(smart doesn’t fall for this trick, btw)

You can view the complete thread on the archives with title URPMI and Requires(post).

Written by netmask

agosto 22, 2005 às 11:03

Publicado em Uncategorized

Tagged with

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

%d blogueiros gostam disto: