[Yum-devel] Guarantee Install Order

Panu Matilainen pmatilai at laiskiainen.org
Sun Feb 24 17:00:16 UTC 2013


On 02/22/2013 09:06 PM, Kevin Knowles wrote:
> Hi all,
>
> I have the following dependency structure:
> A depends on B depends on C
>
> The dependencies are being set in each RPM as requires.  So, A requires B
> and B requires C.
>
> When doing a yum install A, I would expect the install order to always be
> C, B, A.  But we are seeing B being installed before C some times.  The
> problem is B has a post install script that calls an executable installed
> by C.  What will I need to set in RPM or Yum to guarantee that C is always
> installed before B?  I am using RPM v4.8 if that matters.

Simple requires are always sufficient to guarantee install order, unless 
there are dependency loops. If B and C order sometimes changes it 
indicates a loop between them, ie B requires C and C requires B (whether 
its manually or automatically added dependencies doesn't matter)

So you'll want to check the dependencies of C and B packages carefully. 
Loops are always best avoided in the first place, but if its not easy to 
break up the loop (eg by further splitting up packages) adding a 
scriptlet dependency "Requires(post): C" to B will help to cut the loop 
in the right direction, as long as there's no "competing" scriptlet 
dependency in C.

	- Panu -


More information about the Yum-devel mailing list