Andrew.Rutz at Sun.COM wrote:
> hi,
>   An issue was raised during my code review because i replaced the Service
> 
>  filesystem/minimal
> 
>  with 
> 
>   system/sysevent
> 
>  the sysevent Svc currently is dependent on "minimal", but someone in
> future could change system/sysevent's .xml file s.t. it's no longer
> dependent on Minimal.
> 
>   should i make my Svc dependent on BOTH sysevent and Minimal ?

The safe and obvious thing to do is to place dependencies on all 
services you actually depend on. (With comments in the XML is best, so 
that future maintainers don't have to guess at why.)  As you mention, 
then you're resilient to changes in your dependency's dependencies. ;)

>  also, i'm assuming that if i have more than one <dependency> that
> "AND semantics" are used: eg, my Svc starts when "sysevent AND Minimal"
> is True. is my assumption correct ?

Yes.  A service is not started until all of its dependencies are 
satisfied.  (For require_all dependencies, that maps to the statement 
you made above.)

liane

Reply via email to