Hello All,
I'm a bit of newbie with rpm/yum, seeking the help from rpm/yum experts.
Suppose I have an RPM package A which depends on package B. RPM A's spec has 'Requires:B' tag with 'autoprov' and 'autoreq' enabled.
When I install RPM A on a 'centos 6.5' machine with 'RPM version 4.8.0', using the command `yum install A` :
* `rpm` installs A first, then it installs B. * The installation of B could partially fail. That is, A would installed even if the installation of the dependency, B has failed.
Is this the expected behaviour? (Shouldn't B be installed before A?)
Can the same behaviour be expected across versions (such as el5)?
I was hoping that the dependencies would be installed before the main package is installed. Which would prevent the installation of the main package, If one of the dependencies failed to install.
I have tried `PreReq` tag as well, which has same behaviour as far as I can tell.
Is there any other means to accomplish my requirement?
Thanks, Shyam
On Thu, 2015-10-29 at 11:56 +1100, Shyam S wrote:
I have tried `PreReq` tag as well, which has same behaviour as far as I can tell.
Is there any other means to accomplish my requirement?
PreReq now has the same effect as Requires. In earlier versions it did what you want and I don't know about CentOS 5 but PreReq is equivalent to Requires in later releases.
For Centos 6 and 7 you want OrderWithRequires which was introduced in rpm 4.9 and backported to Centos 6 earlier this year.
On 10/29/2015 01:56 AM, Shyam S wrote:
Hello All,
I'm a bit of newbie with rpm/yum, seeking the help from rpm/yum experts.
Suppose I have an RPM package A which depends on package B. RPM A's spec has 'Requires:B' tag with 'autoprov' and 'autoreq' enabled.
When I install RPM A on a 'centos 6.5' machine with 'RPM version 4.8.0', using the command `yum install A` :
- `rpm` installs A first, then it installs B.
- The installation of B could partially fail. That is, A would installed
even if the installation of the dependency, B has failed.
Is this the expected behaviour? (Shouldn't B be installed before A?)
AFAIK yum performs installs and updates as atomic operations, ie in your case if installing B fails yum will also roll back the install of A. Doesn't it?
Can the same behaviour be expected across versions (such as el5)?
I was hoping that the dependencies would be installed before the main package is installed. Which would prevent the installation of the main package, If one of the dependencies failed to install.
I have tried `PreReq` tag as well, which has same behaviour as far as I can tell.
Is there any other means to accomplish my requirement?