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

Re: Author tests and IPC::System::Simple



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Dec 15, 2008 at 07:16:33PM +1100, Paul Fenwick wrote:
>G'day Jonas and debian-perl,
>
>Jonas Smedegaard wrote:
>
>> I believe that instead of removing that build-dependency you should 
>> change it to "Build-Conflicts:".
>
>I hope you'll excuse my newness to Debian packaging, but 
>Build-Conflicts sounds[1] like it means, "if you have this installed, 
>you can't build this package".

That is correctly understood.


>At least for IPC::System::Simple, the BSD::Resource module is 
>selectively used by the (author) testing suite to run additional tests.  
>Except for running these additional tests, the module doesn't change 
>the functionality of the module at all.
>
>If the test *is* causing false positives, I'd prefer to just disable 
>the test than put in a build-conflicts.  As an author test, it doesn't 
>come with any guarantees it will make work outside my development 
>machine.

Yes, removing that flag is another option. The package needs to _either_ 
remove the flag or set the build-conflicts. My point is that it is wrong 
to simply remove the build-dependency, as that change alone will not 
ensure a sane build-environment: even if build-daemons usually provide a 
build environment containing a minimal set of package needed, this 
cannot be relied on.

The reason that I favor enabling the option (+ properly 
build-conflicting) over disabling it is that it does provides a feature: 
The feature of doing extreme tests that you as upstream consider 
relevant only for you to do, but that might make sense for Debian to do 
as well - imagine to possibility of us patching the source for some 
reason, and thereby perhaps by accident lowering the quality of e.g. 
embedded documentation quality or indentation style or similar stuff 
checked by the extreme/exotic checking feature.

Hope that clarifies. :-)


>> But as I posted a little earlier I suggest instead to keep the 
>> build-dependency and instead add the following in debian/rules to not 
>> enable the problematic option on normal builds:
>> 
>> ifneq (,$(DEB_MAINTAINER_MODE))
>>    TEST_AUTHOR=1
>> endif
>
>I think this sounds like a fantastic idea.  It means the maintainers can run
>the extended test suite, but a regular 'apt-get source' user (eg, me)
>doesn't need to worry about exotic tests.

Well, to be more accurate, I actually recommend *both* to add the 
build-conflict and to make the flag optional.

This is needed because build environment is prepared _before_ actual 
build, so build-dependencies adjusted during the build are ignored.

It _is_ possible to both avoid the build-conflict for normal builds and 
offer the TEST_AUTHOR flag for maintainer builds, but a bit more tricky:

1) Dynamically apply build-dependency in clean rule when 
DEB_MAINTAINER_MODE is set, and strip it if it isn't set.

2) Refuse to build if DEB_MAINTAINER_MODE is set and the additional 
package needed for the author tests does not exist. This catches 
DEB_MAINTAINER_MODE being set but without cleaning source first.

2) Refuse to build if DEB_MAINTAINER_MODE is not but the additional 
package is is found in the dependencies. this catches accidental release 
of source package accidentally released while in maintainer mode.

An example of this mechanism is in the netatalk package to offer 
ssl-enabled builds which requires additional dependencies (netatalk 
cannot be distributed officially with SSL support as it causes license 
clash between GPL and openssl).


>[1] Unfortunately I'm in an airport with Internet connectivity, and 
>posting when someone is kind enough to give me some sort of 
>connectivity. This means I don't have a good way of checking what it 
>*really* means. Please educate me if I'm wrong.

I believe you got it right. Have a nice trip, wherever you are headed 
:-)


  - Jonas

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

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklGKSAACgkQn7DbMsAkQLhmZgCfXHe/P1X6dnzWB3zBuNrH+fDx
y3cAnRK6yYlUSy8ltFR/qRGFT9QzZnxK
=VJLR
-----END PGP SIGNATURE-----


Reply to: