Discussion:
Creating database through dbconfig-common or web interface ?
Vincent Bernat
2007-06-23 10:14:08 UTC
Permalink
Hi !

I have packaged textpattern (available on mentors.debian.net). This
application asks the user to create the database himself, then uses a
web interface to ask details about the database (host, login, password)
and then populates the database with tables.

What I have done is using dbconfig-common to create the empty database
and patched PHP code to not ask the user for details about database when
they are available in debian-db.php. The web interface only asks for
initial login information.

Populating the entire database with dbconfig-common is a bit
difficult. With the web interface, the user chooses his language, his
login, password and name and the database is created with those
information. What I could do is to ask the user through debconf for his
name and login information and populate the database with those
information.

There are two drawbacks: from my knowledge, there is no mechanism in
dbconfig-common to populate a database using user input and there is no
way to localize the database (languages are retrieved through RPC calls)
easily (but there are only a few string and the user may change them
later).

Therefore, I am quite happy with the current result (empty database with
dbconfig-common, not asking the user for DB information in the web
interface but asking for login information). From a Debian point of
view, is it OK to use such an hybrid approach ?
--
Make sure input cannot violate the limits of the program.
- The Elements of Programming Style (Kernighan & Plauger)
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
sean finney
2007-06-23 12:34:17 UTC
Permalink
hi vincent,
Post by Vincent Bernat
Therefore, I am quite happy with the current result (empty database with
dbconfig-common, not asking the user for DB information in the web
interface but asking for login information). From a Debian point of
view, is it OK to use such an hybrid approach ?
i would say use your best judgement on the matter. i certainly wouldn't argue
if you wanted to half-use dbconfig-common if you feel the app itself has some
good support for the other half (cacti is in a similar situation, iirc).


sean

Loading...