Modestas Vainius wrote:
> the attached patch adds dh addons add_command_arguments() API that allows
> addons to specify additional arguments which dh will run the specified
> debhelper command(s) with.
> 
> I think this could be useful to develop dh addons that would serve as
> templates. For example, a large group of packages (e.g. KDE) needs to run
> dh_compress -Xfoobar rather than dh_compress. Currently, there is no way
> (neither via make includes, nor dh addons unless I'm missing something) to
> provide the following functionality:
> 
> 1) Run `dh_compress -Xfoobar` by default.
> 2) Clearly allow to override this in debian/rules if needed.
> 
> If this was done via addons, 1) would be configured via addon and 2) would be
> possible via usual dh overrides.

haskell_devscripts does the following:

insert_before("dh_compress", "dh_compress -X.haddock");
remove_command("dh_compress");

That's a nasty hack that probably breaks both command logging and overrides
now that I think about it.

Re your patch, it would probably be clearer to have a
remove_command_arguments rather than having add () clear. It *might*
make sense for remove_command_arguments to allow removing only specific
arguments. Although it two sequence addons get into a situation needing
removal, they're doing something bad and probably failure prone.

My other concern is that the added arguments are passed via
DH_INTERNAL_OPTIONS. So if a override target is used, all commands run
in it will get the arguments passed in it, with no way to override that.
This could be fixed by only adding to @options after the override command
block.

Oh, and don't forget to update doc/PROGRAMMING..

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to