From owner-freebsd-ports@FreeBSD.ORG Thu Jul 20 14:44:55 2006 Return-Path: X-Original-To: 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 545DD16A4E6 for ; Thu, 20 Jul 2006 14:44:55 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F6EF43D8A for ; Thu, 20 Jul 2006 14:44:51 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 920325C31; Thu, 20 Jul 2006 10:44:50 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VZUGwmjt7th0; Thu, 20 Jul 2006 10:44:49 -0400 (EDT) Received: from [192.168.1.251] (pool-68-161-117-245.ny325.east.verizon.net [68.161.117.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 7E89C5C12; Thu, 20 Jul 2006 10:44:49 -0400 (EDT) Message-ID: <44BF96D9.5080100@mac.com> Date: Thu, 20 Jul 2006 10:44:41 -0400 From: Chuck Swiger User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: John E Hein References: <17598.52872.765184.211253@gromit.timing.com> <44BF877E.70208@mac.com> <17599.37113.693799.8184@gromit.timing.com> In-Reply-To: <17599.37113.693799.8184@gromit.timing.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org Subject: Re: conflicting dependency 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: Thu, 20 Jul 2006 14:44:55 -0000 John E Hein wrote: > Chuck Swiger wrote at 09:39 -0400 on Jul 20, 2006: >> John E Hein wrote: >> > Let's say there are two ports A & B. >> > They both provide libfoo.so.1 (and so register CONFLICTS with each other). >> > >> > Now port C wants to use libfoo (and doesn't care if it gets it >> > from A or B). >> > >> > What does port C list in it's LIB_DEPENDS? >> >> Whichever one the author of port C chooses. >> >> Quite often, at least for things like the BerkeleyDB, the author of port C >> will provide tunable OPTIONS or WITH_ or WITHOUT_ flags that you as the user >> of the port can tune to choose a particular version that you like. > > Just for purposes of clarification, in this example, for purposes of > what C wants libfoo for, either libfoo from A or B will do. C doesn't > care. That's right. Plenty of software will work with anything from BDB-1.85 through 4.x, for example. >>> What if it lists A and someone installs B... does A get registered as >>> the dependency when C is installed even though A is not installed? >> >> No, the port should be registered against B and not A, if B is installed. > > I agree. It should. But how does the ports infrastructure accomplish > that? It uses pkg_which to figure out which port the file being depended upon actually comes from. > If the porter listed A as the dependency and libfoo is already > installed via B, what is the mechanism in the ports infrastructure by > which B gets registered as the dependency? The package database keeps track of all files installed by ports and knows which port installed which file. See "man pkg_which". -- -Chuck