[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PATCH: install hooks



Hi Jarno,

On Tue, Dec 17, 2002 at 04:17:56PM +0200, Jarno Elonen wrote:
> (In order get the Finnish spellchecking and hyphenation package finally out,)
> I propose the attached patch for openoffice.org-debian-files. It implements 
> the install hooks.


Thanks a lot for doing this.  I'm afraid I'm going to be away for a few
weeks so I won't have time to look at it for a while.  In case someone else
does, here are my comments:

I didn't envisage having a separate directory for every hook script for
every package.  With 18 separate language packs, any script that wants to do
something if a langugage is added/removed is going to have to be duplicated
18 times (or more if the operations pre/post-inst/rm are needed).

I think it would be better to pass the package name as a parameter (the
first?) to all the scripts in a single directory.  A hook can then operate
only on the package types it needs;

  case $1 in
    openoffice.org)
       [...]
       ;;
    openoffice.org-l10n-*)
       [Operations for any langpack...]
       ;;
  etc.

I do, however, agree that having separate directories for the operation is
useful, since hooks may need to run in the opposite order for install and
remove operations.

So how about:

HOOKDIR="/usr/lib/openoffice.org-debian-files/hooks/$SCRIPT.d"

Also, the format of the hook scripts needs to be documented a little, e.g.
at the top of the master script itself.

Chris

Attachment: pgp12Vcdr10W1.pgp
Description: PGP signature


Reply to: