[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Creating database through dbconfig-common or web interface ?



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)



Reply to: