Hello. Here are my 2¢.

1. about the dependencies

I agree a Recommends on what contains the apache2 maintainer helper is
not satisfactory. You are not using debhelper, so I suppose overriding
that recommendation from the apache2 team is easy to do if you wish.

However, here are some elements you might want to consider:

- The helper will work in the installed state, I mean apache2 doesn't
have to be fully configured for it to register your enconf command.

- Some people might want to use gitweb with an alternate http server,
one in Debian or one of their own. Sure, they will have to set it up
themselves. But a strict dependency will be a pain for them.

- Recommended packages are installed by default.

The correct solution would be to split apache2 helper in its own
package, I guess.


2. about the helpers

I had a look at your patch above, and there are differences between your
maintainer scripts and debhelper ones generated by dh_apache2:

dh_apache2 is disabling the conf in "prerm remove" rather than "postrm
remove". According to policy 6.8, package files are removed between the
two actions. I think you should move the "remove" target from postrm to
prerm, in the unlikely event we end up in a Half-* state, and so that
the requests are properly refused during package file removal, and
finally maybe also because you are "more likely" to have the recommended
package at that early stage.

dh_apache2 also add a "prerm deconfigure" target, only usefull in
conflicts. But you might want it.

I'm attaching a example: The configuration scripts from a package with a
single conf file, as generated by dh_apache. I suppose it can be used as
a reference implementation.

I tried thinking about disappear, abort-deconfigure and other uncommon
targets, but my nose is bleeding right now. ;)


Probably not what you wanted, but I hope this helps a bit.

-- 
Nirgal
# Automatically added by dh_apache2
if true; then
        if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
                . /usr/share/apache2/apache2-maintscript-helper
                for conf in ocsinventory-server  ; do
                        apache2_invoke enconf $conf  || exit $?
                done
        fi
fi
# End automatically added section
# Automatically added by dh_apache2
if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ] ; then
        if true; then
                if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
                        . /usr/share/apache2/apache2-maintscript-helper

                        for conf in ocsinventory-server  ; do
                                apache2_invoke disconf $conf  || exit $?
                        done
                fi
        fi
fi
# End automatically added section
# Automatically added by dh_apache2
if [ "$1" = "purge" ] ; then
        if true; then
                if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
                        . /usr/share/apache2/apache2-maintscript-helper

                        for conf in ocsinventory-server  ; do
                                apache2_invoke disconf $conf  || exit $?
                        done
                fi
        fi
fi
# End automatically added section

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to