[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

sequence of removal within a transaction

Hello All,

I have a interesting problem with rpm not sure if this is a bug. Here is
the description

Suppose we have 2 packages foo and bar
  bar        depends on         foo
  bar ===============> foo

Now while installing "bar" we have to make sure that either "foo" is
already installed or is installed in the same transaction as "foo"

Rpm -ivh foo bar
Rpm -ivh bar foo

While uninstalling with rpm we do the same

Rpm -e foo bar
Rpm -e bar foo

The problem is that in one of the un-install script of "bar" I have to
use a utility provided by "foo"
So as long as "bar" is removed after "foo" things go fine

Rpm -e bar
Rpm -e foo

But if I use 

Rpm -e  bar foo

It doesn't work as foo is removed before bar, and rpm does not through
any error as the dependence is taken care (both foo and bar being
removed in the same transaction).
The problem is only in the *sequence of removal within the transaction*.
Rpm -e foo bar 

works perfectly , my question is 

Should rpm take care of the sequence of packages within the transaction
Should this be done out of rpm and the properly sequenced package list
should be provided to rpm. In that case tools like yum and apt should
take care of this.
On trying the same with yum 
Yum failed 
Yum remove bar
While apt could removed bar with out any problem.

I think the same can also happen on install of 2 packages (if the files
provided by one is used in the pre install script of other)

Thanks for your help

Chandan Dutta Chowdhury

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]