Op zo, 24-09-2006 te 00:39 +0200, schreef Steinar H. Gunderson:
> On Sat, Sep 23, 2006 at 08:20:30PM +0200, Arjan Oosting wrote:
> > The failure is in the NOT in the build-arch target but in the
> > build-indep-stamp target as the log shows:
> 
> That doesn't really matter. 

I agree with that

> > build *IS* called by the dpkg-buildpackage and as such by the build
> > daemons which *IS* in the Debian policy [1]. dpkg-buildpackage -B first
> > calls the build target and after that the binary-arch target.
> 
> What dpkg-buildpackage does, doesn't really matter -- what matters is policy.
> build _must_ build the _entire_ package:
> 
>    The `build' target should perform all the configuration and compilation of
>    the package. 
> 
> IOW, you can't take build-indep out of build.
> 
> However, sbuild is buggy, it seems; policy demands:
> 
>    The `Build-Depends-Indep' and `Build-Conflicts-Indep' fields must be
>    satisfied when any of the following targets is invoked: `build' [...]
> 
> The simple workaround is just to move the dependency, as I've done in my
> patch.

Both ways are workarounds indeed as sbuild should just call build-arch
when it exists but it does not. This has been discussed before, see for
instance the some code in cdbs [1] and some threads on the lists [2,3]

My work around is to only build the arch-dependent part in build (yes,
this does not follow the letter of the policy but is done before) and
only build the arch independent part when binary-indep is called.

Your workaround is to include all the build dependencies for the
architecture independent parts in the Build-Depends as well so both
parts are build in the build target.

I think both are equivalent but I prefer the former as it keeps the
build daemon from building and installing unnecessary stuff. 

The second way is more policy compliant but makes Build-Depends-Indep
worthless as the architecture independent parts are build time and time
again.

Best would be to fix sbuild, but without that I prefer the first option.

Greetings Arjan Oosting

p.s. I hope I did not sound to harsh in my previous mail; I did not
intend to be at least.

[1] part of /usr/share/cdbs/1/rules/buildcore.mk

# This is a required Debian target; however, its specific semantics is
# in dispute.  We are of the opinion that 'build' should invoke
# build-arch and build-indep.  Policy tends to support us here.
# However, dpkg-buildpackage is currently invokes debian/rules build
# even when doing an architecture-specific (binary-arch) build.  This
# essentially means Build-Depends-Indep is worthless.  For more
# information, see Policy §5.2, Policy §7.6, and Debian Bug #178809.
# For now, you may override the dependencies by setting the variable
# DEB_BUILD_DEPENDENCIES, below.  This is not recommended.
DEB_BUILD_DEPENDENCIES = build-arch build-indep
build: $(DEB_BUILD_DEPENDENCIES)

  
[2] http://lists.debian.org/debian-policy/2004/08/msg00014.html
[3] http://lists.debian.org/debian-policy/2006/06/msg00089.html

Attachment: signature.asc
Description: Dit berichtdeel is digitaal ondertekend

Reply via email to