[Dbconfig-common-devel] dbconfig-common/dpkg common,1.28,1.29 config,1.18,1.19 postinst,1.11,1.12
seanius@haydn.debian.org
seanius@haydn.debian.org
- Previous message: [Dbconfig-common-devel] dbconfig-common/debian changelog,1.44,1.45 dbconfig-common.templates,1.20,1.21 rules,1.9,1.10
- Next message: [Dbconfig-common-devel] dbconfig-common/doc dbconfig-common-using.html,1.9,1.10 dbconfig-common.html,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/dbconfig-common/dbconfig-common/dpkg
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv26422/dpkg
Modified Files:
common config postinst
Log Message:
- updated translation
- added first attempt loading pre-dbc configs into dbc
- updated documentation
Index: common
===================================================================
RCS file: /cvsroot/dbconfig-common/dbconfig-common/dpkg/common,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- common 17 May 2005 11:07:32 -0000 1.28
+++ common 18 May 2005 19:49:38 -0000 1.29
@@ -67,6 +67,7 @@
mysql)
. /usr/share/dbconfig-common/internal/mysql
dbc_createuser_cmd='dbc_mysql_createuser'
+ dbc_checkuser_cmd='dbc_mysql_check_user'
dbc_createdb_cmd='dbc_mysql_createdb'
dbc_dropdb_cmd='dbc_mysql_dropdb'
dbc_dropuser_cmd='dbc_mysql_dropuser'
@@ -81,6 +82,7 @@
pgsql)
. /usr/share/dbconfig-common/internal/pgsql
dbc_createuser_cmd='dbc_pgsql_createuser'
+ dbc_checkuser_cmd='dbc_pgsql_check_user'
dbc_createdb_cmd='dbc_pgsql_createdb'
dbc_dropdb_cmd='dbc_pgsql_dropdb'
dbc_dropuser_cmd='dbc_pgsql_dropuser'
Index: config
===================================================================
RCS file: /cvsroot/dbconfig-common/dbconfig-common/dpkg/config,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- config 1 May 2005 06:13:05 -0000 1.18
+++ config 18 May 2005 19:49:38 -0000 1.19
@@ -3,7 +3,7 @@
###
dbc_go(){
- local db happy default_dbtype host newhost port oldhosts authmethod_user authmethod_admin do_config need_adminpw need_userpw f _preconf_list _s _t STATE
+ local db happy default_dbtype host newhost port oldhosts authmethod_user authmethod_admin do_config need_adminpw need_userpw f _preconf_list _s _t STATEiformat ifile
. /usr/share/dbconfig-common/dpkg/common
dbc_config $@
@@ -30,12 +30,49 @@
fi
db_input medium $dbc_package/dbconfig-install || true
;;
- # state 2 - quit if they don't want help, else multidb support part 1
+ # state 2 - check to see if they do.
+ # - see if this is an upgrade newly supporting dbc
+ # - multidb support step 1
2)
db_get $dbc_package/dbconfig-install
if [ "$RET" != "true" ]; then
return 0;
fi
+
+ ##
+ ## start new dbc upgrade section
+ ##
+
+ if dpkg --compare-versions "$dbc_first_version" gt "$dbc_oldversion"; then
+ db_input high $dbc_package/import-oldsettings || true
+ ##
+ ## if they want to import settings from a previous
+ ## non-dbc version, do that and mark the questions
+ ## skipped
+ ##
+ if [ "$dbc_load_include" ]; then
+ iformat=`echo $dbc_load_include | cut -d: -f1`
+ ifile=`echo $dbc_load_include | cut -d: -f2-`
+ eval `dbconfig-load-include $dbc_load_include_args -f $iformat $ifile`
+ for f in $dbc_register_templates; do
+ db_fset $f seen true
+ done
+ db_set $dbc_package/database-type $dbc_dbtype
+ db_set $dbc_package/db/app-user "$dbc_dbuser"
+ db_set $dbc_package/$dbc_dbtype/app-pass "$dbc_dbpass"
+ db_set $dbc_package/$dbc_dbtype/app-password-confirm "$dbc_dbpass"
+ db_set $dbc_package/db/dbname "$dbc_dbname"
+ db_set $dbc_package/remote/host "$dbc_dbserver"
+ db_set $dbc_package/remote/port "$dbc_dbport"
+ for f in $dbc_register_templates; do
+ db_fset $f seen true
+ done
+ fi
+ fi
+
+ ##
+ ## start multidb section
+ ##
# check to see if there's a dbtype answer already in debconf
db_get $dbc_package/database-type && dbc_prompted_dbtype="$RET"
Index: postinst
===================================================================
RCS file: /cvsroot/dbconfig-common/dbconfig-common/dpkg/postinst,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- postinst 1 May 2005 17:20:32 -0000 1.11
+++ postinst 18 May 2005 19:49:38 -0000 1.12
@@ -86,6 +86,12 @@
# end install/reconfigure section
# begin upgrade section
+ if dpkg --compare-versions "$dbc_first_version" gt "$dbc_oldversion"; then
+ if ! $dbc_checkuser_command; then
+ upgrade_error "importing dbconfig-settings"
+ fi
+ fi
+
if [ "$dbc_oldversion" ]; then
# check for new upgrades in these two locations
_dbc_upgradedir=$dbc_share/data/$dbc_package/upgrade/$dbc_dbtype
- Previous message: [Dbconfig-common-devel] dbconfig-common/debian changelog,1.44,1.45 dbconfig-common.templates,1.20,1.21 rules,1.9,1.10
- Next message: [Dbconfig-common-devel] dbconfig-common/doc dbconfig-common-using.html,1.9,1.10 dbconfig-common.html,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]