Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2005 08:37:21 -0600
From:      Craig Boston <craig@yekse.gank.org>
To:        "Michael C. Shultz" <ringworm01@gmail.com>
Cc:        Jiawei Ye <leafy7382@gmail.com>, freebsd-ports@freebsd.org
Subject:   Re: Why does security/amavisd-new depend on db3?
Message-ID:  <20051115143721.GA36868@nowhere>
In-Reply-To: <200511142259.45090.ringworm01@gmail.com>
References:  <c21e92e20511130557g4ad76176l85beb6ceee078886@mail.gmail.com> <c21e92e20511142201o70752d66p20b4ef233612d6e@mail.gmail.com> <20051115065211.GB35001@nowhere> <200511142259.45090.ringworm01@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 14, 2005 at 10:59:44PM -0800, Michael C. Shultz wrote:
> The WITH_BDB_VER=42 only needs to be applied to databases/p5-BerkeleyDB,

In theory, yes, however for dependencies to be registered properly it is
needed for the top level port as well.

Look at line 5012 of bsd.port.mk, where it populates the +CONTENTS file.
PKG_ARGS is defined on line 2052 and issues a "make package-depends"
command, which recursively gown down the ports tree building a list of
dependencies.  However, as previously demonstrated, that list is based on
the _current_ environment of the package that is being installed at that
moment.

> when "portmanager security/amavisd-new" is run ports will build in this order:
> 
> ports/databases/db42			before
> databases/p5-BerkeleyDB		before
> security/amavisd-new 

The behavior can easily be reproduced with manual builds by doing them
in that same order:

cd /usr/ports/databases/p5-BerkeleyDB; make install WITH_BDB_VER=42
cd /usr/ports/security/amavisd-new; make install

The second command will install amavisd-new with an erroneous pkgdep on
bdb3.

Doing with second install with WITH_BDB_VER=42 set will cause it to be
correct.  The first install is unnecessary in this case, but portmanager
would install it separately like that.

ISTM the only way to work around it would be for portmanager to keep
track of which ports were built with what flags, and add those same
flags to any port that depends on them...

Craig



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051115143721.GA36868>