From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.43)
	id 1EExDj-0006mQ-42
	for garchives@archives.gentoo.org; Mon, 12 Sep 2005 22:56:15 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j8CMoTvl000641;
	Mon, 12 Sep 2005 22:50:29 GMT
Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30])
	by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j8CMkKQY025790
	for <gentoo-dev@lists.gentoo.org>; Mon, 12 Sep 2005 22:46:21 GMT
Received: from wproxy.gmail.com ([64.233.184.196])
	by smtp.gentoo.org with esmtp (Exim 4.43)
	id 1EEx8R-0005Qo-Op
	for gentoo-dev@lists.gentoo.org; Mon, 12 Sep 2005 22:50:48 +0000
Received: by wproxy.gmail.com with SMTP id i4so2205268wra
        for <gentoo-dev@gentoo.org>; Mon, 12 Sep 2005 15:50:47 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
        b=dRvE6MIcDp4hCfstE8bilmTsICznq9jvL4YICkL/u2MlDiggA+p5QRtzv+q6KxatFH1kfrqimcnRa5NLejxLDNNNklcehJyMpMLapbJq0DGg5neUhzinBqdu2DZrwvdI95ZDsFMCDWioTr3ZQGxtTJDzsuF3J0QLX/SqCKzMz7U=
Received: by 10.54.46.40 with SMTP id t40mr50461wrt;
        Mon, 12 Sep 2005 15:50:47 -0700 (PDT)
Received: by 10.54.11.52 with HTTP; Mon, 12 Sep 2005 15:50:47 -0700 (PDT)
Message-ID: <28edf05e05091215505f3d41aa@mail.gmail.com>
Date: Tue, 13 Sep 2005 00:50:47 +0200
From: Stefaan <stefaan@gentoo.org>
Sender: stefaan.deroeck@gmail.com
To: Gentoo Developers <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] Berkeley DB, coexistence of different versions
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id j8CMkKQY025790
X-Archives-Salt: 2414c147-0210-46df-a8ef-f7e9dff54858
X-Archives-Hash: 3164c0df8bd86b1ab2d135510cfd0cb5

Hi all!!

Here's an issue Seemant and I have been struggling with, and doesn't
seem as easy to solve as like touching one ebuild.

Berkeley DB comes in many flavors.  Judging by the slots in the
ebuilds (1, 3, 4, 4.1, 4.2, 4.3) there's many different interface
versions.  This comes with the added fun of having packages depend on
certain versions of DB.  Nothing shocking so far.

However, looking at the heimdal-package we noticed several problems
(which seem to be more widespread than just heimdal):
1) The package won't build when both db-4 and db-3 are installed (bug
#100723).  Underlying reason is that the package only knew about
db-4.0, and thus assumed the include for db-4.x to be called
<db4/db.h>.  Because the installed db-4.2 didn't have this name for
its include, and because the package was still trying to link with a
4.x library, this gave problems.
2) Detecting of available version of db-includes and db-libraries is
done separately.  So we have a first algorithm looking for the most
recent include files (out of a list of possibilities known at the time
the package is created), and a second algorithm doing the same for the
libraries.  This is a reason the error in (1) was possible.
3) In an attempt to circumvent the problem, we could start hard coding
packages to require a specific db-version. But this would have
distinct disadvantages: a) as it seems logical to depend on the latest
version available at ebuild-creation time, installing a system with
ebuilds of different ages results in a system with many db-versions,
even when it's not necessary; b) we undo the effort put in a package
to make it compile with different db-versions
4) Note that even then, the problem in (1) hasn't disappeared, as the
configure-scripts of the package still crawl around the system to find
a suitable include-library combo and, not knowing the full truth,
select an unsuitable one.  There even seems to be a disagreement (on
upstream level) on whether libdb3.so.* or libdb-3.so.* is the
preferred naming.

Looking at other distributions:
- Fedora Core seems to try and solve this problem by allowing only
db-4 (I guess db-4.x's are compatible to some level then?)  It does
however package db-1 together with libgnome-1 in a single rpm to
account for a dependency problem there.  This is not an option for
gentoo, as nvi, xemacs, libtool, partysip, nss_ldap, hotkeys, jigdo
etc. seem to depend on older versions.  And er, what when db-5
appears?
- Debian has a clean solution: install as many db-versions as you
want, but only one development package at a time.  The development
package contains /usr/include/db.h AND /usr/lib/libdb.so.  Adapting
packages if necessary to use those two is an easy task.  However, this
isn't an option for gentoo either, as we don't split packages into
-libs and -devel.

So I'm wondering, what would be a clean solution for this problem?

Cheers,
Stefaan

-- 
gentoo-dev@gentoo.org mailing list