[geeklog-devel] Autoinstall plugins and dependencies
Blaine Lang
devel at portalparts.com
Sat Oct 3 12:03:49 EDT 2009
Vincent Furia wrote:
> Is there a reason why:
>
> Our plugins today, have a pre-install hook that is called on install
> and checks if the dependencies like other plugins, directories, perms
> etc are tested before allowing the install to proceed and we show the
> site admin the status of the pre-requisites.
>
> Isn't sufficient?
This is how we are able to do it now (using a standard
admin/plugin/install.php script) but with out using the autointall
feature in 1.6.
The autoinstall feature if available will not execute the
admin/install.php and is missing the preinstall hook
There is a postinstall hook but the main autoinstall hook is meant to
just return an array of config parms. Yes, we can add our prechecks in
this function but our only option if the prechecks fail is to not return
the install config array. Not very clean and not very informative.
Vincent Furia wrote:
> Would a dependency array work better.
>
> PluginA_Required = array('PluginB', 'PluginC');.
>
> With that information the autoinstaller could be made to be smart
> enough to generate a dependency tree and install multiple plugins in
> order. Other "preinstall" checks (file permisisons, etc) could be
> accomplished in the install function.
This is closer as it would use a new preinstall hook. I still think we
need 2 modes so that we either display an interactive page or return
just a status that would allow the automated install to proceed on to
the next plugin and report success/fail results at the end.
Plugin installation order is something that has come up in the past as a
want/need. The autoinstall feature would need to read in all the to-be
installed plugins install_parms array and then resort based on any
dependencies.
Blaine
More information about the geeklog-devel
mailing list