[Zope3-dev] Re: Dependencie-handling
R. David Murray
rdmurray@bitdance.com
Tue, 1 Jul 2003 11:55:49 -0400 (EDT)
On Tue, 1 Jul 2003, Marcus J. Ertl wrote:
> I think it isn't that easy! For example: For my forum I will need:
>
> A textsource service like used in zwiki! This must be installed
> earlier!
> A Membership System
> A Database Adapter
> A Service of my own, for creating unique names
My point is that you should not be depending on *specific* other
packages, but rather on Interfaces.
> Of course, if one is missing, an errormessage should be given. But I
> think there should be a common way for
>
> - checking for such depencies
Checking is straightforward: try to access the Interface your package
needs. I don't think there is any more general way to do this,
nor should there be.
> - a commone way to tell the user/admin of them.
Good idea. I'm not up-to-date on all the new X3 features, but I
don't think this is one of them. Make a proposal <grin>.
> IMHO, there should be a standard way to tell an admin/user why
> something is broken. And in a not perfekt but good world, it also would
> tell admin/user what to do!
Once you test for the presence of the Interface you need, you can
trap the error, and return a message saying something like:
Can't find XXX service (or XXX component). Installing package
YYY is one good way to solve this problem" <grin>. At the very least
there should be a Best Practicies document that decribes how
to do this kind of checking.
> Just tell me, where should the message go to:
>
> - zmi
When instaling the package through the zmi, +1
> - stdout
-1
> - logfile
+1 (use the standard logging facility)
> - a special logfile
-1. But the package configuration/registration/whatever-it-is page should
probably have these error messages.
> - per mail to admin
-1
> And as long time project, a system like apt-get on debian would be fun,
> witch resolves such problems on it self.
Variations on this have been discussed, but I don't think anyone
has done any coding yet.
--RDM