Re: Can we require build-arch/indep targets for lenny?
Daniel Schepler <email@example.com> writes:
> On Monday 18 June 2007 04:30:55 am Goswin von Brederlow wrote:
>> I would like to gather up some momentum for a policy change. Namely
>> that the build-arch/indep targets in debian/rules become required
>> instead of being optional.
>> The reason for this is that dpkg-buildpackage can't reliable detect
>> the existance of the build-arch/indep targets and must call 'build'
>> instead. This forces every source to compile both architecture
>> specific and architecture independent code on all buildds and
>> increases the Build-Depends of packages a lot.
> How about instead requiring something like: the build-arch target must return
> successfully or with a status of 2 (the standard make error status
> for "target not found"), and in the latter case the build target must return
> successfully. That is, if Build-Depends but not necessarily
> Build-Depends-Indep are installed, the shell snippet
That is already required by policy.
What is missing is that nothing else may return an error of 2 and I
think that is a bad idea to require.
> debian/rules build-arch || (test $? -eq 2 && debian/rules build)
> must work and exit with a status of 0.
Which causes double builds in case something fails with error 2.
> This would make it possible for dpkg-buildpackage -B to be reliable while
> allowing most (or even all?) of the current packages to stay as they are
> until maintainers can add the recommended build-arch target.
The target has been recommended for years. But nobody is adding it
because it can't be used reliably by the tools.