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

Bug#345619: debian-policy: 4.8. binary-{arch, indep} should fail with error code 2 -> must



Kari Pahula writes ("Bug#345619: debian-policy: 4.8. binary-{arch, indep} should fail with error code 2 -> must"):
> Debian policy 4.8. states:
> If one or both of the targets `build-arch' and `build-indep' are
> not provided, then invoking `debian/rules' with one of the
> not-provided targets as arguments should produce a exit status
> code of 2.

Unfortunately there are some problems with this approach.

* Firstly, we would have to specify that the exit status 2 must _not_
be used other than when the target does not exist.  This would involve
overhauling all of the rules files anyway (in which case we might as
well add the relevant target).

* Secondly, rules files are generally makefiles and make doesn't allow
the makefile to manipulate make's exit status.

> An alternative would be to require that build-{arch,indep} are always
> present and both depending on build target, just like already done
> with binary-* targets.  But that would require larger changes.

I think this would be a better idea (although of course you mean that
`build' should depend on both of the new targets, not vice versa).
You could check the Standards-Version header to see if you want to use
the new target.

Ian.



Reply to: