Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Apr 2005 18:15:40 -0500
From:      "Henry Miller" <hank@blackhole.com>
To:        freebsd-ports@freebsd.org
Subject:   dependancys optional plugings
Message-ID:  <380-220054616231540281@blackhole.com>

next in thread | raw e-mail | index | archive | help

Greetings,=20

I'm working on a port for krecipes
http://sourceforge=2Enet/projects/krecipes/  the first draft is already
in ports/79038, but it isn't acceptable in the current format,
because any/all of 3 databases could be chosen, while I only deal
with one=2E  Actually it might be acceptable, I think the objection
stated does not apply=2E  Anyway, I'm in the process of cleaning it up,
and wondering how to deal with the options=2E

I originally placed sqlite as the default database (probably the
best), but MySQL or Postgresql could be used instead by installing
databases/qt-mysql-plug-in or databases/qt-pgsql-plug-in
(respectively)=2E  No changes are required to the port=2E

I can check for the WITH=5FMYSQL and WITH=5FPOSTGRESQL variables easily
enough=2E  Adding a WITHOUT=5FSQLITE variable is also easy=2E However I'm
not sure what to do about all the special cases that come up by
combining them=2E

One user is limited to one database backend=2E  You can import recipes
from one database to the other if you want to switch, but there is no
provision for using two backends at the same time=2E  =20

The options as I seem them follows=2E   Which is the preferred way of
handling this=3F

Easiest is to install all the backends all the time, but that is
clearly wrong=2E  It wastes disk space if nothing else, but it also
installs clients, which might conflict with a different version the
user has installed=2E

Next easiest is to do what I did: make sqlite the database=2E   Users
who want MySQL or Postgresql just need to install the plug-in
manually=2E   I have verified that if the plug-in is installed after
krecipes it is useable without any other effort=2E   A trivial
modification is to look for the WITH=5F variable and require the
plugins=2E   The only downside is a plug-in could be installed and used
latter, and that would not be reflected in the dependency lists,
meaning cutleaves or similar would suggest removing it even though it
is a dependency=2E

There are configure arguments to disable any database=2E   If
WITH=5FMYSQL is not specified I could disable looking for the MySQL
plug-in=2E (same for postgresql)  This solves the dependency issue, but
at the cost of requiring a rebuild to add backends=2E=20


As a last question, is there any reason to make a different backend
default=3F   MySQL is perhaps the most stable as the others were added
latter=2E  Sqlite has no administration costs though=2E



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