[Dbconfig-common-changes] [dbconfig-common] r279 - in trunk: .
debian dpkg
Sean Finney
seanius at costa.debian.org
Wed Aug 2 08:01:18 CEST 2006
Author: seanius
Date: 2006-08-02 06:01:14 +0000 (Wed, 02 Aug 2006)
New Revision: 279
Modified:
trunk/dbconfig-generate-include
trunk/debian/changelog
trunk/debian/dbconfig-common.templates
trunk/dpkg/common
trunk/dpkg/config
Log:
* remove import-oldsettings template, i don't think the need
merits having it.
* packages that migrate to dbconfig-common no longer get the confusing
installation question.
* remove date from the d-g-i generated config files, to reduce
any ucf noise.
Modified: trunk/dbconfig-generate-include
===================================================================
--- trunk/dbconfig-generate-include 2006-08-02 06:00:27 UTC (rev 278)
+++ trunk/dbconfig-generate-include 2006-08-02 06:01:14 UTC (rev 279)
@@ -227,7 +227,6 @@
## database access settings in /bin/sh format
## automatically generated from $inputfile
## by $0
-## `date -R`
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded. *however*,
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-08-02 06:00:27 UTC (rev 278)
+++ trunk/debian/changelog 2006-08-02 06:01:14 UTC (rev 279)
@@ -17,6 +17,12 @@
* new db-test-pgsql-migration-{1.9,2.0} packages to both show and
test how to migrate from previous non-dbc packaging.
* fix for sh-format include files from dbconfig-load-include.
+ * remove import-oldsettings template, i don't think the need
+ merits having it.
+ * packages that migrate to dbconfig-common no longer get the confusing
+ installation question.
+ * remove date from the d-g-i generated config files, to reduce
+ any ucf noise.
[ Bart Cornelis (cobaco) ]
* Updated Dutch translation
Modified: trunk/debian/dbconfig-common.templates
===================================================================
--- trunk/debian/dbconfig-common.templates 2006-08-02 06:00:27 UTC (rev 278)
+++ trunk/debian/dbconfig-common.templates 2006-08-02 06:01:14 UTC (rev 279)
@@ -398,14 +398,6 @@
Type: note
_Description: PostgreSQL does not support empty passwords.
-Template: dbconfig-common/import-oldsettings
-Type: note
-_Description: dbconfig-common will attempt to load existing settings
- dbconfig-common will now attempt to load the pre-existing settings of
- ${pkg}. Later, these settings will be validated, and if there is
- any problem with loading or using them you will be given the option to
- enter them again later.
-
Template: dbconfig-common/internal/reconfiguring
Type: boolean
Default: false
Modified: trunk/dpkg/common
===================================================================
--- trunk/dpkg/common 2006-08-02 06:00:27 UTC (rev 278)
+++ trunk/dpkg/common 2006-08-02 06:01:14 UTC (rev 279)
@@ -31,7 +31,7 @@
### some internal variables
###
# templates common to all database types
- dbc_standard_templates="database-type dbconfig-install dbconfig-upgrade dbconfig-remove dbconfig-reinstall password-confirm app-password-confirm purge upgrade-backup passwords-do-not-match install-error upgrade-error remove-error import-oldsettings internal/reconfiguring"
+ dbc_standard_templates="database-type dbconfig-install dbconfig-upgrade dbconfig-remove dbconfig-reinstall password-confirm app-password-confirm purge upgrade-backup passwords-do-not-match install-error upgrade-error remove-error internal/reconfiguring"
# templates common to mysql database types
dbc_mysql_templates="mysql/method remote/host remote/newhost mysql/app-pass mysql/admin-user mysql/admin-pass remote/port db/dbname db/app-user"
Modified: trunk/dpkg/config
===================================================================
--- trunk/dpkg/config 2006-08-02 06:00:27 UTC (rev 278)
+++ trunk/dpkg/config 2006-08-02 06:01:14 UTC (rev 279)
@@ -3,7 +3,7 @@
###
dbc_go(){
- local f db happy default_dbtype host newhost port oldhosts authmethod_admin do_config _preconf_list _s _t STATE iformat ifile install_question
+ local f db happy default_dbtype host newhost port oldhosts authmethod_admin do_config _preconf_list _s _t STATE iformat ifile install_question migrating
. /usr/share/dbconfig-common/dpkg/common
dbc_debug "(config) dbc_go() $@"
@@ -26,6 +26,13 @@
dbc_read_package_config
dbc_preseed_package_debconf
+ # check out if they're migrating from a non-dbc version
+ if [ "$dbc_oldversion" ] && [ "$dbc_first_version" ] && \
+ dpkg --compare-versions "$dbc_first_version" gt "$dbc_oldversion"; then
+ migrating="yes"
+ fi
+
+
# the first question we ask will differ depending on how we're invoked
if [ "$dbc_command" = "configure" ]; then
install_question="$dbc_package/dbconfig-install"
@@ -38,7 +45,12 @@
fi
# and start our beautiful state-machine
- STATE=1
+ # if we're migrating from a non-dbc version, skip the first question
+ if [ ! "$migrating" ]; then
+ STATE=1
+ else
+ STATE=2
+ fi
while true; do
case "$STATE" in
# state 1 - ask if they want our help at all
@@ -61,10 +73,7 @@
# *and* the maintainer has provided the first version that used
# dbconfig-common *and* this version is newer than the
# previously installed version... do the dbc import stuff.
- if [ "$dbc_oldversion" ] && [ "$dbc_first_version" ] && \
- dpkg --compare-versions "$dbc_first_version" gt "$dbc_oldversion";
- then
-
+ if [ "$migrating" ]; then
# if dbc_load_include is set, determine the format
# and location of the old config file
if [ "$dbc_load_include" ]; then
@@ -78,7 +87,6 @@
## skipped
##
if [ "$ifile" ] && [ -f "$ifile" ]; then
- db_input high $dbc_package/import-oldsettings || true
dbc_logpart "migrating old settings into dbconfig-common: "
if [ "$dbc_debug" ]; then
dbc_debug "dbconfig-load-include $dbc_load_include_args -f $iformat $ifile"
More information about the Dbconfig-common-changes
mailing list