On Mon, 27 Feb 2012, Wookey wrote:
> The subject is covered in some detail here:
> http://wiki.debian.org/DebianBootstrap
> and was covered at Debconf in Baja Luka.
> 
> This little patch allows Build-Depends-Stage1 to be added to package
> control files, for rules files to use DEB_BUILD_OPTIONS=STAGEN, and
> for dpkg-checkbuilddeps to not complain about the missing
> build-depends when doing staged/bootstrap builds.

Some remarks:

I don't like the fact the you have numbered fields and that you
only include "Stage1" as known field. If we keep this numbered field
approach, we have to implement something generic to recognize all the
indexed fields (Stage1, Stage2, etc.).

But in fact I wonder if we can't simply get rid of those fields and embed
everything in the usual field. When doing a staged build,
dpkg-checkbuilddeps could implicitly create a fake package
"bootstrap-stage" with a version corresponding to the requested stage.
When not doing a staged build, the version would be "99".

The you can say that some dependencies are to be discarded in staged
builds:
libldap-dev | bootstrap-stage (<< 99)

Or in some speficic staged build:
libldap-dev | bootstrap-stage (= 1)

Or you can add dependencies for a specific stage:
bootstrap-stage (!= 2) | foo-minimal

You can find the number of available stages by generating the simplified
build dep for successive stage numbers until the resulting dependencies
no longer changes.

The main disadvantage of this approach is that many other tools have to
learn to create this fake package when resolving this dependency (only
to support the case where you add a dependency to a specific stage, are
there any cases of this? the other cases are backwards compatible for
tools who are interested in normal build dependencies)

What do other people think of this? Had this been considered in your
discussions?

> If we can get this support into Wheezy then it will be easy to do work
> on this problem in packages over the next release cycle without needed
> a patched dpkg, so I hope that's do-able. (Yes I know I should have
> filed this patch 8 months ago when I wrote it).

It looks like doable if we can agree on what's the best approach.

> +my $buildstage = 0;

As Jonathan pointed out, you're lacking the option parsing code that sets
this variable. And also the corresponding manual page update.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to