From owner-freebsd-questions@FreeBSD.ORG Mon Apr 19 12:05:32 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E04B16A4CE for ; Mon, 19 Apr 2004 12:05:32 -0700 (PDT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A32943D41 for ; Mon, 19 Apr 2004 12:05:32 -0700 (PDT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin01-en2 [10.13.10.146]) by smtpout.mac.com (8.12.6/MantshX 2.0) with ESMTP id i3JJ5VKE016484; Mon, 19 Apr 2004 12:05:31 -0700 (PDT) Received: from [10.1.1.193] (nfw2.codefab.com [199.103.21.225] (may be forged)) (authenticated bits=0)i3JJ5VgQ013936; Mon, 19 Apr 2004 12:05:31 -0700 (PDT) In-Reply-To: <025596A38A894B45AFE62346A6BF474609CBACD1@waexch1.qgraph.com> References: <025596A38A894B45AFE62346A6BF474609CBACD1@waexch1.qgraph.com> Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <83D6CC19-9234-11D8-9D0B-003065ABFD92@mac.com> Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Mon, 19 Apr 2004 15:05:25 -0400 To: "Ziller, James" X-Mailer: Apple Mail (2.613) cc: "'freebsd-questions@freebsd.org'" Subject: Re: Dependency hell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2004 19:05:32 -0000 On Apr 19, 2004, at 2:34 PM, Ziller, James wrote: > So then is there a way that the ports/package system can automatically > handle replacing libfoo.so.3 with libfoo.so.4, so that packages > compiled to > use libfoo.so.3 can use libfoo.so.4 instead (assuming the new version > is > backward compatable)? If the new version of the library is backwards-compatible, it ought to be installed as libfoo.so.3 (not .4), and yes, the ports system will handle such upgrades in place just fine. In particular, OpenSSL (aka libssl.so.n) is an example of a library that has had many bugfiles and updates without changing version numbers often. You don't need to recompile everything that depends on libssl when you update libssl. People (should) only bump shared library numbers when the library's interface changes in an incompatible fashion. When that happens, it's a bad idea to try to fake the system out (say by symlinking libfoo.so.3 to .4): programs tend to crash when you try, or do worse things such as corrupt data or mishandle authentication and thus open up a security hole. > Or can the port link against say libfoo.so (which > should be a symlink to the version of the library that's installed)? libfoo.so is normally a symlink to the latest version of a particular shared library. A port that genuinely doesn't care which version of libfoo you have doesn't need to depend on a particular version #, and you'd see a line in the Makefile like: LIB_DEPENDS= foo:${PORTSDIR}/misc/foo ...but most ports end up with more specific dependencies (ie, foo.3). Maintaining backwards compatibility is not a high priority of the ports system and the result is that people end up recompiling a lot of stuff, but it's not easy to provide better solutions to this problem. -- -Chuck