From owner-freebsd-ports@FreeBSD.ORG Tue Nov 15 14:37:25 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BD6816A421 for ; Tue, 15 Nov 2005 14:37:25 +0000 (GMT) (envelope-from craig@yekse.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E58843D45 for ; Tue, 15 Nov 2005 14:37:24 +0000 (GMT) (envelope-from craig@yekse.gank.org) Received: by ion.gank.org (mail, from userid 1001) id 85EE72D2D6; Tue, 15 Nov 2005 08:37:24 -0600 (CST) Date: Tue, 15 Nov 2005 08:37:21 -0600 From: Craig Boston To: "Michael C. Shultz" Message-ID: <20051115143721.GA36868@nowhere> Mail-Followup-To: Craig Boston , "Michael C. Shultz" , Jiawei Ye , freebsd-ports@freebsd.org References: <20051115065211.GB35001@nowhere> <200511142259.45090.ringworm01@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511142259.45090.ringworm01@gmail.com> User-Agent: Mutt/1.4.2.1i Cc: Jiawei Ye , freebsd-ports@freebsd.org Subject: Re: Why does security/amavisd-new depend on db3? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2005 14:37:25 -0000 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