On Sun, Oct 24, 2010 at 04:25:13PM +0200, Olaf van der Spek wrote:
On Sun, Oct 24, 2010 at 4:15 PM, Jonas Smedegaard <[email protected]> wrote:
Hmm, how does one properly create those default symlinks?
[snip] :-)
I mean, where do I call this such that it's only done on first install and not on every update?

It is non-fatal to invoke lightly-enable-mod when already enabled.

It spews some warnings, and I would love the more elegant approach:

  * Add new lightly-query-mod reporting if enabled/disabled/missing
  * Encourage package maintainers to first query then enable

This would also make it possible for packages to disable conflicting modules, which involves checking if exists and enabled, ask for permission to disable (as it might be needed by other setup snippets!) and fail the package install if not being granted permission.

Even more elegant would be a mechanism for packages to declare required modules. This should be doable as an evolutionary step extending above: Have lightly-disable-mod check a conf.d style pile of must-have hints and fail removal if the module matches anything there (including in the error which package/file stated the must-have).

But all of this should not need to be implemented all at once :-)


 * the config file still encourage enabling modules there

Due to the server.modules += part?

Well, that too. But the very thing of listing a bunch of modules commented out is a hint to the local admin (and the package maintainer!) that uncommenting is the preferred style of configuration here.


 * there is no warning (that I know of) about multiple enabling modules

2010-10-24 16:23:36: (plugin.c.131) Cannot load plugin mod_access more
than once, please fix your config (we may not accept such configs in
future releases

I do not mean in code, but in the config file.


 * you do not provide a mechanism for other packages to enable modules during install.

This would only apply to rewrite now, right?

Nope.  Here's a more concrete suggestion:

  * Add low-ordered module snippets for each module provided by lighttpd
* Add debconf interface to declare space-delimited list of modules to enable during install, by default installing only rewrite * Replace both enabled and commented out modules in main configfile with a note advertising lightly-enable-mod / lightly-disable-mod

If that seems too complex, then at first replace the middle part with hard-coded enabling the rewrite module in postinst.


 - Jonas

--
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature

Reply via email to