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

Re: berkeleydb version insanity



On Wed, Feb 12, 2003 at 05:19:23PM -0800, Will Lowe wrote:
> Colin Watson wrote:
> > On Thu, Feb 13, 2003 at 12:23:43AM +0000, Matthew Wilcox wrote:
> > > Changing what version of DB you use is a major pain.
> > 
> > Amen. I try to do it only when other changes to the format of my
> > databases become necessary.
> 
> Hmm, that's what I suspected -- that the problem was a lot more
> complicated than I was guessing on the surface.  But the fact that 300
> packages Depend: on libdb3 and only 90 Depend: on libdb2 suggests to
> me that upstream packages are mostly keeping up.

It's not really a matter of upstream packages keeping up. As far as I
can tell, once you've switched from the 1.85 API to the new API the
changes required to port source code from one version to the next are
usually fairly small. The issue is that once you've released a package
using one on-disk format you have to handle database upgrades when you
move to a new on-disk format.

The only libdb-dependent package I maintain is man-db, and it's not too
bad because its databases are just caches and can generally be thrown
away for just the computational inconvenience of rebuilding them. If you
look at something like subversion, though, its databases are
repositories whose contents must be kept safe, and moving them to a new
on-disk format requires special administrative action for every
repository (dump with old (possibly static) svnadmin, load with new
svnadmin into a fresh directory, test, delete or archive away the old
repository). Or have a look at bug #103102 for some insane pain caused
by a transition that wasn't handled properly at first.

It can all be handled, pretty much, but you need to go beyond "I rebuilt
the package with libdb3 and it still worked" to "I populated some
databases with libdb2, rebuilt the package with libdb3 and some improved
maintainer scripts, upgraded, and my databases were upgraded smoothly".
With some packages you may well have to worry about the contents of
per-user databases too. This might involve providing a conversion script
like the one that used to be in gmc, so that either the sysadmin can run
it for all users (beware home directories shared over NFS between
machines running different versions of the package), or users can be
told to run it for themselves.

> How are other distros handling this, anyone know?  And do we have any
> way to figure out if most of the apps using v2 are really only using
> the 1.85 interface?

You can look for __db185_open in their imported symbols, but that's
probably the least of your concerns.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: