Hi!

On Mon, 2012-07-16 at 22:04:57 -0400, P. J. McDermott wrote:
> On 2012-07-11 23:51, Guillem Jover wrote:
> > I was referring to:
> > 
> >  * Introducing build profiles (the specific characters '<>' could be
> >    changed, this is just an example):
> > 
> >    Build-Depends: huge (>= 1.0) [i386 arm] <!embedded !bootstrap>, tiny
> > 
> >    + Generic, it can solve other problems like bootstrapping.
> >    + Does not duplicate information.
> >    + Does not overload existing syntax.
> >    + Does not have the problem of mixed positive and negative arches.
> >    - This could only be deployed in Debian on etch+1 and started to be used
> >      on etch+2, that does not mean it cannot be used elsewhere beforehand
> >      given different release cycles.
> 
> Out of curiosity, I implemented the above.  As I was able to borrow some
> of the architecture specifications parsing logic and interfaces, profile
> spec parsing was pretty simple to add.

Cool, thanks!

> The attached alternative patch makes dpkg-checkbuilddeps and Dpkg::Deps
> parse and reduce build profiles (e.g. "<!embedded !stage1>") and makes
> dpkg-gencontrol add a new "Build-Profile" field (like the previously
> proposed "Build-Stage" field) to packages built with a profile.

I've only skimmed over it, but it looks good in principle (w/o having
checked every exact detail).

> Added to dpkg-buildpackage and dpkg-checkbuilddeps is a "-P<profile>"
> option.  dpkg-buildpackage sets a "DEB_BUILD_PROFILE" environment
> variable (unless it is already set) which is used by dpkg-checkbuilddeps
> and dpkg-gencontrol.  (The new variable again follows the interface for
> setting a host arch.)

Looks good.

> The changes have been tested by building a package using
> dpkg-buildpackage (with a "-P" option) and by directly running
> debian/rules (with "DEB_BUILD_PROFILE" set).

Great.

> The patch does not verify that the profile chosen by the user is
> actually specified in the package's control file.  I'm not sure if (or
> where) that should be done, but it would be fairly easy to do by listing
> the "profiles" keys of all build dependencies.  Is similar checking done
> for the host arch?

No, the builder should be able to use those unconditionally regardless
of the package having this kind of specifications, otherwise you'd
need to know if the package uses them to be able to first set the
flags, which does not really scale. Also the debian/rules could change
say configure options depending on the profile, and that's something
the dpkg tools would not be able to detect anyway.

> To be clear, this patch (an implementation of Guillem's "build profiles"
> proposal) is a possible alternative to the previously considered
> options.  We're not yet sure if all of the bootstrap dependency
> information can be easily expressed in this build profiles syntax; I'll
> be working to help determine this in the coming days and weeks.

Because the syntax should allow for positive and negative specifiers,
it should (in principle) allow all possible cases. But using this and
veryfing it's enough to cover all your needs would be helpful regardless.

> So although I'm not proposing this for immediate inclusion, we'd
> appreciate feedback on the design and implementation.

Before I'll consider including something like this, the aforementioned
deployment to see if it really covers all your needs would be nice,
and after that we'd need to propose and discuss this in for example
debian-devel, because other software will need to be adapted to
support the new syntax. I'll try to give a more detailed review of
the code in few days.

thanks,
guillem


-- 
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