Re: Bug#521918: pbuilder --build --binary-arch invokes 'build' target
- To: Julien Cristau <jcristau@debian.org>, Petr Pudlak <deb@pudlak.name>, 521918@bugs.debian.org, debian-science@lists.debian.org, debian-mentors@lists.debian.org
- Subject: Re: Bug#521918: pbuilder --build --binary-arch invokes 'build' target
- From: Lionel Elie Mamane <lionel@mamane.lu>
- Date: Mon, 11 May 2009 13:46:30 +0200
- Message-id: <[🔎] 20090511114630.GA28754@capsaicin.mamane.lu>
- Mail-followup-to: Lionel Elie Mamane <lionel@mamane.lu>, Julien Cristau <jcristau@debian.org>, Petr Pudlak <deb@pudlak.name>, 521918@bugs.debian.org, debian-science@lists.debian.org, debian-mentors@lists.debian.org
- In-reply-to: <[🔎] 20090505171323.GR9464@patate.is-a-geek.org>
- References: <20090426162242.xhs1cgyww0gwg4o4@webmail.pudlak.name> <[🔎] 20090505170141.GA15899@pudlak.name> <[🔎] 20090505171323.GR9464@patate.is-a-geek.org>
On Tue, May 05, 2009 at 07:13:23PM +0200, Julien Cristau wrote:
> arch-specific builds run 'debian/rules build && $rootcmd
> debian/rules binary-arch' (where rootcmd is fakeroot or sudo). They
> can't do anything else, because the build-arch target is (still) not
> required.
Sure they can:
debian/rules build-arch
if [ "$?" -eq 2 ] then
apt-get install ${BUILD_DEPENDS_INDEP_OF_THE_PACKAGE}
apt-get remove ${BUILD_CONFLICTS_INDEP_OF_THE_PACKAGE}
debian/rules build
fi
$rootcmd debian/rules binary-arch
Not wanting to do something as convoluted / brittle is another matter
altogether and something I'd support. (Returning error code 2 is
mandatory for debian/rules when called on a non-existing target, if I
remember well.) So, pbuilder can call "build" unconditionally (that in
itself is not a bug), but then it _must_ respect Build-Depends-Indep
and Build-Conflicts-Indep.
> Whatever's needed for this needs to be in Build-Depends.
No, policy is very clear on that: if you call the "build" target, you
_must_ satisfy Build-Depends-Indep and Build-Conflicts-Indep:
http://www.debian.org/doc/debian-policy/footnotes.html#f46
http://www.nl.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps
I quote (emphasis mine):
Build-Depends-Indep, Build-Conflicts-Indep
The Build-Depends-Indep and Build-Conflicts-Indep fields must be
satisfied when any of the following targets is invoked: *build*,
build-indep, binary and binary-indep.
If you make "build-arch" or "binary-arch", you need Build-Depends. If
you make "build-indep" or "binary-indep", you need Build-Depends and
Build-Depends-Indep. If you make "*build*" or "binary", you need
*both*.
Under the current policy it is a bug for pbuilder to not install the
Build-Depends-Indep.
--
Lionel
Reply to: