From owner-freebsd-ports@FreeBSD.ORG Fri May 20 07:46:24 2005 Return-Path: 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 E917716A4CE; Fri, 20 May 2005 07:46:23 +0000 (GMT) Received: from kweetal.tue.nl (kweetal.tue.nl [131.155.3.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 677DA43DB2; Fri, 20 May 2005 07:46:22 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: by kweetal.tue.nl (Postfix, from userid 40) id 4E5C013B9FB; Fri, 20 May 2005 09:46:21 +0200 (CEST) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by kweetal.tue.nl (Postfix) with ESMTP id BB7C913B9EA; Fri, 20 May 2005 09:46:20 +0200 (CEST) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.13.3/8.13.1/Submit) id j4K7kKUa001391; Fri, 20 May 2005 09:46:20 +0200 (CEST) (envelope-from stijn) Date: Fri, 20 May 2005 09:46:20 +0200 From: Stijn Hoop To: Ade Lovett Message-ID: <20050520074620.GB95023@pcwin002.win.tue.nl> References: <20050518234933.05e2584b@dolphin.local.net> <20050519183922.GB6978@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Bright-Idea: Let's abolish HTML mail! X-Spam-DCC: : X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on kweetal.tue.nl X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=6.3 tests=BAYES_00 autolearn=ham version=2.64 cc: freebsd-ports@freebsd.org cc: Kris Kennaway Subject: Re: Disabling dependency on esound in ports builds X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2005 07:46:24 -0000 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 20, 2005 at 12:06:05AM -0700, Ade Lovett wrote: > > WITHOUT_ESOUND=3Dyes >=20 > In this particular case, that knob does indeed work most of the time. >=20 > Explaining to software authors in general to not provide configure =20 > (or other) scripts that bring in extra functionality based on =20 > previously installed software, without providing for a specific flag =20 > that should be turned on (thus allowing a proper dependency to be =20 > registered by *any* package management system).. well, that's left =20 > as an exercise to the interested reader. But in ports one could add a patch to NOT do this. Granted, that's not idea= l, but at least it's controllable. > This is one of the reasons that I would consider code along the lines =20 > of: >=20 > .if exists(somelibrary) || defined(WITH_something) > foo_DEPENDS+=3D ... > .endif >=20 > to be fundamentally flawed and in violation of POLA, where, if port A =20 > has such an (exists) dependency on port B, the following sequence: >=20 > install A > install B > portupgrade A >=20 > results in the second (A) being subtly different from the first, in =20 > that it is using extra functionality from B, without explicitly =20 > asking the user whether that's OK. The fact that the dependencies =20 > are actually correctly registered is something of a mitigating =20 > factor, but is certainly not an excuse for such "dependency-creep". I would add that in the few cases where I was bitten by this, it's exceptionally frustrating to find out WHY behaviour changed (or even package names, in case of -esound etc). I do know the reason why this kind of code was added: it was considered incorrect behaviour that port A would NOT automatically pick up support for library B if it was installed by the user. For the reasons Ade outlines above, and considering reproducible package building, it would seem nice to find a solution that turns these kinds of checks off automatically, perhaps behind a flag (NO_AUTO_DEPS=3Dyes). A quick grep through the tree also shows this construct: %%% =2Eif exists(${LOCALBASE}/lib/libmad.so.2) WITH_MAD=3D YES =2Eendif =2Eif defined(WITH_MAD) =2E.. =2Eendif %%% which of course amounts to the same thing, except that adding NO_AUTO_DEPS might be easier. --Stijn --=20 "An adult is a child who has more ethics and morals, that's all." -- Shigeru Miyamoto --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCjZXMY3r/tLQmfWcRAldbAKCa4r0ttE9at+aUeWI2Rpzme4DtXgCfXoC9 A2dBI0TqKF42zldVQmQMRKk= =ZKQq -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--