Date: Fri, 20 May 2005 09:46:20 +0200 From: Stijn Hoop <stijn@win.tue.nl> To: Ade Lovett <ade@freebsd.org> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Disabling dependency on esound in ports builds Message-ID: <20050520074620.GB95023@pcwin002.win.tue.nl> In-Reply-To: <CFC68145-1928-4984-BCB5-6019CB893C89@FreeBSD.org> References: <20050518234933.05e2584b@dolphin.local.net> <20050519183922.GB6978@xor.obsecurity.org> <CFC68145-1928-4984-BCB5-6019CB893C89@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050520074620.GB95023>