Re: Build-depends for arch independent files
Simon McVittie <email@example.com> writes:
> On Sun, 22 Aug 2010 at 20:22:17 +0200, Sebastian Andrzej Siewior wrote:
>> "This means that architecture restrictions must not be used in binary
>> relationship fields for architecture-independent packages (Architecture:
> This just forbids the following:
> Architecture: all
> Depends: hello [i386 amd64]
> Note that "binary relationship fields" means Depends, Recommends, Provides,
> etc., as opposed to Build-Depends, Build-Conflicts or Build-Depends-Indep.
>> I have a question about packages like antelope. Its dependency line
>> Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-repo-helper,
>> ant, docbook-xsl, xsltproc
> Strictly speaking, the packages that are needed for the build (only)
> should be moved to Build-Depends-Indep. Packages that are needed for
> clean, like debheper and cdbs, have to stay in Build-Depends in any case.
>> In theory an arch-all rebuild of this package should fail.
> dpkg-buildpackage -A (arch-independent-only) requires both Build-Depends and
> Build-Depends-Indep, like a normal build; dpkg-buildpackage -B
> (arch-dependent-only, as used on buildds) requires only Build-Depends.
> In practice, dpkg-buildpackage -A is rarely used; maintainers build
> arch-independent packages, plus arch-dependent packages for their own
Actually policy and common practice disagree here:
| The dependencies and conflicts they define must be satisfied (as
| defined earlier for binary packages) in order to invoke the targets in
| debian/rules, as follows:
| clean, build-arch, and binary-arch
| Only the Build-Depends and Build-Conflicts fields must be
| satisfied when these targets are invoked.
| build, build-indep, binary, and binary-indep
| The Build-Depends, Build-Conflicts, Build-Depends-Indep, and
| Build-Conflicts-Indep fields must be satisfied when these targets
| are invoked.
The problem is that "build" is always called since "build-arch" and
"build-indep" are optional and not reliable detectable.
According to policy all of Build-Depends, Build-Conflicts,
Build-Depends-Indep, and Build-Conflicts-Indep would have to be
satisfied all the time.
In practice calling dpkg-buildpackage -B, which calls build, only
requires Build-Depends and Build-Conflicts. Since buildds only install
those for building packages that is a well tested thing for any non
I think the "build" target should be changed to require only
Build-Depends/Conflicts to reflect common practice.
And I hope that maybe one day build-arch/indep become required so it can
be used by dpkg-buildpackage and so that the seperation of
Build-Depends/-Indep starts to actualy make sense.