I, too, think this would be a valuable addition.

On Tue, Feb 09, 2010 at 02:38:34PM -0500, Joey Hess wrote:

> If I did this, I would need to also make override_dh_strip to be
> skipped when DEB_BUILD_OPTIONS=nostrip.

Yes, would also be nice.


> One reason to dislike this is it would mean redundant tests in
> dh that'd have to be maintained in parallel with the tests in the
> commands.

Agree that it would take work to implement, though I would think that
the tests could be centralized and used by both dh and dh_auto_test.
Alternatively: if the logic was all in dh (to skip both dh_auto_test
and override_dh_auto_test), then it would not need to be in
dh_auto_test at all.


> Perhaps a better reason to dislike this is that it violates least
> suprise when rules file refactoring. One can move anything into an
> override target, even if it does not really match the overridden
> debhelper command, and expect it to be run at the appropriate point.
> 
> Here's an example that would cause the package to FTBFS if nocheck
> were tested.
> 
> override_dh_auto_test:
>       # the test suite does not 100% pass at present,
>       # but the output is useful documentation for users
>       (dh_auto_test; echo $?) > test-results
> 
> override_dh_install:
>       dh_install test-results /usr/share/doc/alien/

One could also argue that THIS EXAMPLE violates the principle of least
surprise -- in two ways.  First, from the builder's point of view: I
might set "nocheck" (say, for resource constraint considerations) but
have the checks run anyway.  Secondly, from a short-on-time debian
maintainer's [1] point of view: I might initially use the default
dh_auto_test, but then find I need to do something a bit special and
write the override -- and be surprised that I've unwittingly broken
the "nocheck" feature.

Perhaps unsurprisingly, I believe my examples are more common than
Joey's :-), so I second the original feature request.

-Steve

[1] This just happened to me, which is why I'm writing to support this
feature request.

Attachment: signature.asc
Description: PGP signature

Reply via email to