[Dbconfig-common-devel] _DBC_vars don't sustitute
Andres Maneiro
amaneiro at igalia.com
Fri Oct 5 10:21:59 UTC 2007
Hi,
i am having a problem with "dbc_generate_*" clausules. Vars into configuration file aren't sustituted (if you can download full source package in order to make some tests, you can donwload it as indicates below).
Well, go with my problem. In my postinst script i have:
... (some code here)
PKG=phpreport
VERS=1.5
export www_dir=/usr/share/${PKG}
dbc_pgsql_createdb_encoding='UTF8'
dbc_generate_include_owner='www-data:www-data'
dbc_generate_include_perms='0640'
dbc_generate_include='template:'${www_dir}'/include/config_db2.php'
dbc_generate_include_args="-o template_infile="${www_dir}"'/include/config_db.template'"
. /usr/share/dbconfig-common/dpkg/postinst.pgsql
... (more code)
dbc_go ${PKG}-${VERS} $@
... (and more)
The "config_db.php" and "config_db.template" exist but the "_DBC_vars_" aren't substitute for their values. I get some like this...
<?
// Database connection
$hostname_db="localhost";
$port_db="5432";
$login_db="_DBC_DBUSER_";
$password_db="_DBC_DBPASS_";
$dbname_db="_DBC_DBNAME_";
?>
In this point... i don't know that it is going. Someone knows?
Thanks,
Andrés
PD: If you want, you can download full source package from here:
http://community.igalia.com/twiki/bin/view/PhpReport/WebCVS
or you can do:
cvs -d :pserver:anonymous at cvs.igalia.com:/var/publiccvs export -r
PHPREPORT_1_5 phpreport
Actually, configuration file is manually added (include/config_db.php),
but in future it will be generated from include/config_db.template.
Uncomment this lines into phpreport.postinst in order to make test about
this:
#dbc_pgsql_createdb_encoding='UTF8'
#dbc_generate_include_owner='www-data:www-data'
#dbc_generate_include_perms='0640'
#dbc_generate_include='template:'${www_dir}'/include/config_db2.php'
#dbc_generate_include_args="-o template_infile="${www_dir}"'/include/config_db.template'"
More information about the Dbconfig-common-devel
mailing list