use flags? (was: Re: Introducing Build-Recommends / Build-Core-Depends?)
On 2011-08-13 13:28, Andreas Barth wrote:
> Building with core Dependencies only
> If doing an build of the core functionality only, norecommends is
> added to the environment DEB_BUILD_OPTIONS. This is the signal for
> dpkg-buildpackage etc to only check for the minimal set of packages,
> and for the debian/rules to accept if some functionality is missing
> (i.e. might require changes to usage of ./configure).
> (Buildds should do it in a way that they first check if however all
> recommends are available, and only failing that setting the header -
> makes it more likely we get full packages early; but that's an
> implementation sidenote).
This proposal effectively means there will two ways of building the
package: 'core' and 'full' one.
If we accept the idea there's now more than one way to build the
package, I would like us do not limit the number of ways to '2' but
rather extend the prospoal to set up something similar to Gentoo's USE
flags. The advantages of that idea:
- porters/buildds/local administrators will have the greater flexibility
to choose what the want to (re)build;
- for the architecture bootstrap this could be used for packages that
need to be rebuilt more than once with growing set of features
build-by-build (don't know if such packages exist).
The disadvantage is obvious: harder to implement.
I imagine it to look something like:
Build-Depends-Core: debhelper (>= 7), libbz2-dev
Like in the original proposal, sets of build-depends are to be chosen by
DEB_BUILD_OPTIONS, for example DEB_BUILD_OPTIONS=use=gtk2,qt4. In
absence of 'use' flag (i.e. by default), all 'optional' packages are
built. And like in the original proposal, there's a header in the
resulting .changes (and possibly in something else) which determines what
was the value of the 'use' flag when building, like
For the compatibility, dpkg-genchanges would combine all Build-Depends-*
to a single Build-Depends.
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
C++/Perl developer, Debian Developer