From owner-freebsd-ports@FreeBSD.ORG Sun Jun 3 12:23:59 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCD6A16A400 for ; Sun, 3 Jun 2007 12:23:59 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (it.buh.tecnik93.com [81.196.204.98]) by mx1.freebsd.org (Postfix) with ESMTP id 983B313C483 for ; Sun, 3 Jun 2007 12:23:59 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id D72992C50C7F; Sun, 3 Jun 2007 15:23:58 +0300 (EEST) Date: Sun, 3 Jun 2007 15:23:58 +0300 From: Ion-Mihai Tetcu To: Klaus Koch Message-ID: <20070603152358.4a7f06e1@it.buh.tecnik93.com> In-Reply-To: <200706031233.52274.klaus@sentinel.dyndns.info> References: <200706020904.36038.klaus@sentinel.dyndns.info> <200706021457.56718.klaus@sentinel.dyndns.info> <20070602213322.5675cf6d@it.buh.tecnik93.com> <200706031233.52274.klaus@sentinel.dyndns.info> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.12; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org Subject: Re: FreeBSD Port: dspam-devel-3.8.0,1 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2007 12:23:59 -0000 On Sun, 3 Jun 2007 12:33:52 +0200 Klaus Koch wrote: > > The error you're getting is not from the port or portinstall but > > from the bsd.*.mk framework. You can't have multiple mysql versions > > on your system. > > > > If you're sure you want mysql51 then upgrade the client, upgrade > > dependent ports then config and install dspam: > > > > portupgrade -f -o databases/mysql51-client mysql-client-5.0\* && \ > > portupgrade -rf -x mysql-client-5.1\* mysql-client-5.1\* &&\ > > cd /usr/ports/mail/dspam-devel &&\ > > make config &&\ > > make install clean > > sorry for not making myself clear, but I _have_ mysql-client-5.1 > installed. It's what freebsd installs by default if you're doing > portinstall mysql-server/mysql-client. OK, that's portinstall's (and your) business then: # grep DEFAULT_MYSQL_VER /usr/ports/Mk/bsd.database.mk # DEFAULT_MYSQL_VER DEFAULT_MYSQL_VER?= 50 MYSQL_VER= ${DEFAULT_MYSQL_VER} > Since a few months I have a website running with lighttpd, php and > mysql and I never did anything special with mysql versions. Now I > want install dspam and it doesn't work... that's all I want to tell > you :-) snippet from mail/dspam/Makefile: .ifdef(WITH_MYSQL40) WANT_MYSQL_VER= 40 #PKGNAMESUFFIX= -mysql40 .elifdef(WITH_MYSQL41) WANT_MYSQL_VER= 41 #PKGNAMESUFFIX= -mysql41 .elifndef(WITHOUT_MYSQL50) WANT_MYSQL_VER= 50 #PKGNAMESUFFIX= -mysql50 .elifdef(WITH_MYSQL51) WANT_MYSQL_VER= 51 #PKGNAMESUFFIX= -mysql51 .endif > If you do these steps: > > Install freebsd > portinstall mysql-server > portinstall dspam > > you get the error... Please read _carefully_ the next 2 lines: Go in mail/dspam and do a 'make config' _and_ select MYSQ51. The portinstall or make install clean or whatever. It will work. The _DEFAULT_ mysql version for the port in 5.0. _because_ that's the default version in bsd.database.mk. You have 5.1 installed. The port is nice and friendly and gives you an OPTIONs screen to select the mysql version you want. If you set the wrong version or conflicting version either the port or the framework tells you this explicitly. If you don't want to fix your mistake (of selecting the wrong mysql version in the OPTIONs screen) that's your business. The only thing I can think of for improving this part is to set the default MySQL version in the port's OPTIONs to the one installed on the system, if any and default to 50 if no MySQL is installed. Which will further complicate an already long (664 lines) Makefile with little added benefit. IMO either there's no MySQL installed - in which case the port is so friendly that it gives a nice screen for the user to select the version he wants - or there is a MySQL version installed - in which case one assumes the admin knows what version he has and selects it in the OPTIONs screen. (I'm hacking the Makefile for this but something doesn't work right yet). -- IOnut