Subject: Re: specifying database options
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-pkg
Date: 12/19/2005 20:21:48
"Steven M. Bellovin" <smb@cs.columbia.edu> writes:

> I have set
> 
> 	PKG_OPTIONS.cucipop+=db
> 
> in mk.conf.  It complains, though, that "db4 is not an acceptable
> Berkeley DB" when I do the build.

So that line worked, in that cucipop turned on db support.

> I worked around that by saying
> 
> 	_BDB_TYPE=db2 make
> 
> but that's ugly.  What's the right thing to put into mk.conf for this?  
>
> RingTFM has not enlightened me.

Did you try the following?

$ more /usr/pkgsrc/mk/*

But seriously, reading bdb.buildlink3.mk is helpful here (which I
realize you probably did).  See in
particular lines 78 and 82-86.  I'm not a bdb expert, but it looks
like db[1234] can all be installed in parallel.  cucipop specifies
that it needs db2, and then BDB_DEFAULT is db4.  So, I'd except
bdb.buildlink3.mk to find the intersection of BDB_ACCEPTED and
_BDB_PKGS, and somehow choose them in some preference order.  Instead,
it chooses db4 as default, and then fails because db4 isn't in
DBD_ACCEPTED.

So it seems bdb.buildlink3.mk is broken, and that setting something in
mk.conf isn't really a way around this.  But, it's quite likely I'm
missing something here.  Reading the commit log for 1.11, it seems
this behavior is intended.  Perhaps unsetting the db2 line in cucipop
will enable it to build with db4.   What isn't clear to me is whether
packages can reasonably insist on db2 but not db4, and if it really is
possible to install things in parallel.  Did you already have db4
installed?

-- 
        Greg Troxel <gdt@ir.bbn.com>