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

Re: apt-get internals help



On Saturday 06 September 2003 19:34, Matt Zimmerman wrote:
> On Sat, Sep 06, 2003 at 11:40:34AM +0300, George Danchev wrote:
> > On Saturday 06 September 2003 07:34, Matt Zimmerman wrote:
> > > You cannot hope to write a script smart enough to modify an arbitrary
> > > debian/rules to do what you want.  What you need to do is to come up
> > > with a useful standard for passing this kind of option to debian/rules,
> > > and modify packages to support it.
> >
> > It might be easier if more debian/rules files respect DEB_BUILD_OPTIONS.
> > I'm not sure what the policies say about that, but could that be a
> > standard ?
>
> DEB_BUILD_OPTIONS is for generic options which apply to almost any package.
> What you want are package-specific options, like enabling or disabling
> features.  An environment variable would be a reasonable way to implement
> it, but I think it should be separate from DEB_BUILD_OPTIONS.

I do not think the variable is the real issue here. If we grab a snippet of 
the MPlayer's debian/rules:
./configure --prefix=/usr --confdir=/etc/mplayer $(DEB_BUILD_OPTIONS)

--prefix and --confdir are generic and they come with the generic unmodified 
rules file. The real issue here is that we need an separate (new or 
additional) media to store the so called USE options per source package, 
where the maintainer can store the optional flags he decided could be useful 
for that version of the source package - let's say debian/use. Then utilities 
like apt-build could be hacked to loop over this file first and to show us a 
nice a la "debconf with many faces interface" like:

This are the alternatives to build this Debian source package:
[   ]--with-apples (recommended and used by buildd)
[   ]--with-raspberries
[ x ]--with-apples --with-raspberries

Then apt-build resets the DEB_BUILD_OPTIONS per this session like:
# DEB_BUILD_OPTIONS="\
--with-apples --with-raspberries \
$ANY-OTHERS-COMMON-OPTIONS-IF-ANY" \
fakeroot debian/rules binary
-- 
pub  4096R/0E4BD0AB 2003-03-18 <keyserver.bu.edu>
1AE7 7C66 0A26 5BFF DF22 5D55 1C57 0C89 0E4B D0AB 
                      
   



Reply to: