Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jun 2007 15:23:58 +0300
From:      Ion-Mihai Tetcu <itetcu@FreeBSD.org>
To:        Klaus Koch <klaus@sentinel.dyndns.info>
Cc:        ports@freebsd.org
Subject:   Re: FreeBSD Port: dspam-devel-3.8.0,1
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Jun 2007 12:33:52 +0200
Klaus Koch <klaus@sentinel.dyndns.info> 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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070603152358.4a7f06e1>