Date: Mon, 7 Jun 2004 14:57:36 +0200 From: Ulrich Spoerlein <q@uni.de> To: Kris Kennaway <kris@obsecurity.org> Cc: ports@FreeBSD.ORG Subject: RFC: Re-work pkgdep/DEPORIGIN? (was: Re: How to LIB_DEPEND on pgsql client?) Message-ID: <20040607125736.GA765@galgenberg.net> In-Reply-To: <20040602215840.GA86249@xor.obsecurity.org> References: <20040602193835.496de20b@it.buh.cameradicommercio.ro> <20040602215840.GA86249@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 02.06.2004 at 14:58:40 -0700, Kris Kennaway wrote: > > Hi, > > What do I need to tell to my Makefile to make a port depend on > > Postgresql client, which was removed ? The client can be built with > > -DWITHOUT_SERVER, but how do I do this from the Makefile; should I use a > > custom script ? >=20 > You can't (think about how users would add packages). For now -- until > someone can redo the client/server split properly, in a way that > doesn't break ports that try to use it -- you need to depend on the > single postgresql package, The real fix is IMHO not to blindly record the dependancy provided in the Makefile. That is: LIB_DEPENDS+=3D pq.3:${PORTSDIR}/databases/postgresql7-client will record databases/postgresql7 as dependancy, no matter what package actually provided the libpq.so.3 in the first place. Postgres is not the only place where this is wrong, lang/php4 has the same problems. Most Ports require www/mod_php which I dont have installed. Instead I'm using lang/php4 with WITH_APACHE. x11/nvidia-driver has it too: Stale dependency: nvidia-driver-1.0.4365_2 -> linux_base-7.1_7 (emulators/l= inux_base): linux_base-8-8.0_4 (score:62%) ? ([y]es/[n]o/[a]ll) [no]=20 In general, almost every slave port has this problem. The fix now would be to make pkg_info -W work with -o and then using this output in the pkgdep field. % pkg_info -W /usr/local/lib/libpq.so.3 /usr/local/lib/libpq.so.3 was installed by package postgresql-7.4.2 Now we use this, instead of the "${PORTSDIR}/databases/postgresql7-client" supplied in the LIB_DEPENDS field. % pkg_info -oW /usr/local/lib/libpq.so.3 databases/postgresql7 This should work without problems for ports, but I can't say if this works for packages. AFAIK the +CONTENTS just gets extracted to /var/db/pkg, but one would have to re-write it, to check which package realy satisfied which dependancy. Something like a new DEPFILE comment, which has the file we depend on (libpq.so.3 in the example) and pkg_add checks if this is in sync with the DEPORIGIN comment. If they differ, DEPORIGIN gets re-written. If libpq.so.3 is provided by no package (check via pkg_info -W) but is existent, we can print out errors. I had this idea since the first time pkgdb gave me trouble because of postgresql and php4, but I don't have any patches yet, as I'm not very familiar with 'make package' and pkg_add. And I don't even know if people here agree that this is the right direction to take. So, do you want me to come up with patches? Ulrich Spoerlein --=20 PGP Key ID: F0DB9F44 Get it while it's hot! PGP Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAxGZAmArGtfDbn0QRAu8sAJ4lkhRcCK3KqIdCSiUOR94eas51QQCggQPf Wl/CL8egcgzNjk1IaIk1AJQ= =ynfk -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040607125736.GA765>