From owner-freebsd-ports@FreeBSD.ORG Mon Jun 7 12:57:44 2004 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 2585D16A4CE for ; Mon, 7 Jun 2004 12:57:44 +0000 (GMT) Received: from wrzx35.rz.uni-wuerzburg.de (wrzx35.rz.uni-wuerzburg.de [132.187.3.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 788A443D54 for ; Mon, 7 Jun 2004 12:57:43 +0000 (GMT) (envelope-from q@uni.de) Received: from wrzx34.rz.uni-wuerzburg.de (wrzx34.rz.uni-wuerzburg.de [132.187.3.34]) by wrzx35.rz.uni-wuerzburg.de (Postfix) with ESMTP id 6771ADCD67; Mon, 7 Jun 2004 14:57:42 +0200 (CEST) Received: from virusscan (localhost [127.0.0.1]) by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id 494419B36B; Mon, 7 Jun 2004 14:57:42 +0200 (CEST) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id 1DC389B1FE; Mon, 7 Jun 2004 14:57:42 +0200 (CEST) Received: from coyote.q.local (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 0A91AD3CB9; Mon, 7 Jun 2004 14:57:42 +0200 (CEST) Received: from roadrunner.q.local (roadrunner [192.168.0.147]) by coyote.q.local (8.12.10/8.12.10) with ESMTP id i57Cvfw2002236; Mon, 7 Jun 2004 14:57:41 +0200 (CEST) (envelope-from q@roadrunner.q.local) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.12.10/8.12.10) with ESMTP id i57CvfZW002282; Mon, 7 Jun 2004 14:57:41 +0200 (CEST) (envelope-from q@roadrunner.q.local) Received: (from q@localhost) by roadrunner.q.local (8.12.10/8.12.10/Submit) id i57Cva9E002281; Mon, 7 Jun 2004 14:57:36 +0200 (CEST) (envelope-from q) Date: Mon, 7 Jun 2004 14:57:36 +0200 From: Ulrich Spoerlein To: Kris Kennaway Message-ID: <20040607125736.GA765@galgenberg.net> Mail-Followup-To: Kris Kennaway , Ion-Mihai Tetcu , ports@FreeBSD.ORG References: <20040602193835.496de20b@it.buh.cameradicommercio.ro> <20040602215840.GA86249@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <20040602215840.GA86249@xor.obsecurity.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new (Rechenzentrum Universitaet Wuerzburg) cc: Ion-Mihai Tetcu cc: ports@FreeBSD.ORG Subject: RFC: Re-work pkgdep/DEPORIGIN? (was: Re: How to LIB_DEPEND on pgsql client?) 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: Mon, 07 Jun 2004 12:57:44 -0000 --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--