[Dbconfig-common-changes] [dbconfig-common] r260 - in trunk: debian
dpkg
Sean Finney
seanius at costa.debian.org
Tue Jun 13 17:18:45 CEST 2006
Author: seanius
Date: 2006-06-13 15:18:45 +0000 (Tue, 13 Jun 2006)
New Revision: 260
Modified:
trunk/debian/changelog
trunk/debian/dbconfig-common.config
trunk/debian/dbconfig-common.postinst
trunk/debian/dbconfig-common.templates
trunk/dpkg/common
trunk/dpkg/config
Log:
* now provide a global configuration option which affects the priority of
questions related to remote database configuration.
* updated spanish debconf translations, thanks to
Javier Fern?\195?\161ndez-Sanguino Pe?\195?\177a (closes: #372650).
* provide a fix for over-zealous sanity-checking breakage with packages that
support multiple database types. this should remove the need for any
ugly workarounds. thanks to David Gil (closes: #372948).
* dbconfig-common was not respecting manual changes to its global config
file. whoops, fixed.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-06-13 15:17:20 UTC (rev 259)
+++ trunk/debian/changelog 2006-06-13 15:18:45 UTC (rev 260)
@@ -3,8 +3,15 @@
* NOT RELEASED YET
[ sean finney ]
- * updated spanish debconf translations, thanks to Javier Fernández-Sanguino Peña.
- Closes: #372650.
+ * now provide a global configuration option which affects the priority of
+ questions related to remote database configuration.
+ * updated spanish debconf translations, thanks to
+ Javier Fernández-Sanguino Peña (closes: #372650).
+ * provide a fix for over-zealous sanity-checking breakage with packages that
+ support multiple database types. this should remove the need for any
+ ugly workarounds. thanks to David Gil (closes: #372948).
+ * dbconfig-common was not respecting manual changes to its global config
+ file. whoops, fixed.
[ Bart Cornelis (cobaco) ]
* Updated Dutch translation
Modified: trunk/debian/dbconfig-common.config
===================================================================
--- trunk/debian/dbconfig-common.config 2006-06-13 15:17:20 UTC (rev 259)
+++ trunk/debian/dbconfig-common.config 2006-06-13 15:18:45 UTC (rev 260)
@@ -6,13 +6,19 @@
if [ -f /etc/dbconfig-common/config ]; then
. /etc/dbconfig-common/config
- if [ "$remember_admin_pass" = "true" ]; then
+ if [ "$dbc_remember_admin_pass" = "true" ]; then
db_set dbconfig-common/remember-admin-pass "true"
else
db_set dbconfig-common/remember-admin-pass "false"
fi
+ if [ "$dbc_remote_questions_default" = "true" ]; then
+ db_set dbconfig-common/remote-questions-default "true"
+ else
+ db_set dbconfig-common/remote-questions-default "false"
+ fi
fi
db_input low dbconfig-common/remember-admin-pass || true
+db_input low dbconfig-common/remote-questions-default || true
db_go
Modified: trunk/debian/dbconfig-common.postinst
===================================================================
--- trunk/debian/dbconfig-common.postinst 2006-06-13 15:17:20 UTC (rev 259)
+++ trunk/debian/dbconfig-common.postinst 2006-06-13 15:18:45 UTC (rev 260)
@@ -10,6 +10,8 @@
db_get dbconfig-common/remember-admin-pass
dbc_remember_admin_pass="$RET"
+db_get dbconfig-common/remote-questions-default
+dbc_remote_questions_default="$RET"
dbc_write_global_config
Modified: trunk/debian/dbconfig-common.templates
===================================================================
--- trunk/debian/dbconfig-common.templates 2006-06-13 15:17:20 UTC (rev 259)
+++ trunk/debian/dbconfig-common.templates 2006-06-13 15:18:45 UTC (rev 260)
@@ -1,3 +1,19 @@
+Template: dbconfig-common/remote-questions-default
+Type: boolean
+Default: false
+_Description: Will this server be used to access remote databases?
+ For the database types that support it, dbconfig-common includes support
+ for configuring databases on remote systems. When installing a package's
+ database via dbconfig-common, the questions related to remote
+ configuration are asked with a priority such that they are
+ skipped for most systems.
+ .
+ If you select this option, the default behaviour will be to prompt you
+ with questions related to remote database configuration when you install
+ new packages.
+ .
+ If you are unsure, you should not select this option.
+
Template: dbconfig-common/remember-admin-pass
Type: boolean
Default: false
Modified: trunk/dpkg/common
===================================================================
--- trunk/dpkg/common 2006-06-13 15:17:20 UTC (rev 259)
+++ trunk/dpkg/common 2006-06-13 15:18:45 UTC (rev 260)
@@ -48,6 +48,13 @@
if [ -f $dbc_globalconfig ]; then
. $dbc_globalconfig
fi
+ # set the priority of "remote database" related questions for
+ # the database types that support it
+ if [ "$dbc_remote_questions_default" = "true" ]; then
+ dbc_remote_questions_priority="high"
+ else
+ dbc_remote_questions_priority="low"
+ fi
dbc_set_dbtype_defaults $dbc_dbtype
}
@@ -113,6 +120,7 @@
### dump global configuration to a config file
###
dbc_write_global_config(){
+ # XXX ucf here...
dbc_debug "dbc_write_global_config() $@"
cat << EOF > $dbc_globalconfig
# automatically generated by the maintainer scripts of dbconfig-common
@@ -123,6 +131,11 @@
# set to "true" to keep admin passwords cached in debconf
dbc_remember_admin_pass="$dbc_remember_admin_pass"
+# dbc_remote_questions_default: will we be likely to install on remote servers?
+# set to "true" to raise the priority of debconf questions related to
+# database installation on remote servers (for database types that support this)
+dbc_remote_questions_default="$dbc_remote_questions_default"
+
EOF
}
@@ -218,7 +231,7 @@
_dbc_sanity_check package || dbc_install_error
# gracefully fetch this to support multi-dbtype packages
- if [ "$dbc_dbtypes" ]; then
+ if [ ! "$dbc_hardcoded_dbtype" ]; then
db_get $dbc_package/database-type && dbc_dbtype="$RET"
fi
# dbconfig needs to be reloaded at this point for multi-dbtype apps
Modified: trunk/dpkg/config
===================================================================
--- trunk/dpkg/config 2006-06-13 15:17:20 UTC (rev 259)
+++ trunk/dpkg/config 2006-06-13 15:18:45 UTC (rev 260)
@@ -179,7 +179,7 @@
if [ "$dbc_ssl" = "true" -a "$dbc_dbtype" = "pgsql" ]; then
db_set $dbc_package/pgsql/method "tcp/ip + ssl"
fi
- db_input low $dbc_package/$dbc_dbtype/method || true
+ db_input $dbc_remote_questions_priority $dbc_package/$dbc_dbtype/method || true
;;
# state 4 - do stuff based on the connection method
4)
@@ -248,7 +248,7 @@
fi
# on what port?
- db_input low $dbc_package/remote/port || true
+ db_input $dbc_remote_questions_priority $dbc_package/remote/port || true
fi
;;
# state 7 - pgsql specific auth stuff, part 1
More information about the Dbconfig-common-changes
mailing list