[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Profile support in apt



On Tue, Jan 29, 2013 at 06:37:55PM +0100, Johannes Schauer wrote:
> Hi,
> 
> On Tue, Jan 29, 2013 at 07:55:20AM +0800, Daniel Hartwig wrote:
> > On 29 January 2013 01:47, Wookey <wookey@wookware.org> wrote:
> > > If apt honours DEB_BUILD_PROFILE=foo then sbuild (which already has a
> > > patch to set this) just sets it and everything should 'just work' (we
> > > already have dpkg patches to make it DTRT).
> > >
> > > So, pointers as to which files/functions I should be looking at are
> > > what this post hopes to elicit, although of course patches showing
> > > just how trivial it is, would be even better :-)
> > 
> > Frontend: cmdline/apt-get.cc (DoBuildDeps).
> > 
> > Backend: apt-pkg/deb/debsrcparser.cc (BuildDepends),
> > apt-pkg/deb/deblistparser.cc (ParseDepends).
> > 
> > Please check for the envvar in the frontend rather than the backend.
> 
> I hacked together a simple patch that just touches ParseDepends and
> heavily borrows from the logic which parses architecture lists.
> 
> As wookey already pointed out it would be nice if apt could understand
> the environment variable DEB_BUILD_PROFILE.  But the only environment
> variable apt currently uses is APT_CONFIG.
> 
> So what would be the preferred way to read the variable in the frontend
> and pass it to the backend? A new global variable? Or store it as part
> of _config?  In that case a configuration variable APT::Profile could be
> introduced, symmetric to APT::Architecture. But then again: no other
> configuration currently has the option to be given by an environment
> variable. Also, a profile is always selected on a per-package basis and
> will never (and should never) be set globally.
> 
> So how would apt people like to have this done?

A configuration option seems the best option. I'd prefer
something like APT::Build-Profile, or APT::Get::Build-Profile
in case the option is exclusive to apt-get (I'd chose
Build-Profile over simply Profile, because that's more
accurate in my opinion)

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.


Reply to: