[Dbconfig-common-changes] [dbconfig-common] r342 - in trunk: debian
dpkg
Sean Finney
seanius at costa.debian.org
Thu Oct 12 21:52:02 UTC 2006
Author: seanius
Date: 2006-10-12 21:52:02 +0000 (Thu, 12 Oct 2006)
New Revision: 342
Modified:
trunk/debian/dbconfig-common.templates
trunk/dpkg/common
Log:
preseeding fix, part 1
Modified: trunk/debian/dbconfig-common.templates
===================================================================
--- trunk/debian/dbconfig-common.templates 2006-10-10 09:49:59 UTC (rev 341)
+++ trunk/debian/dbconfig-common.templates 2006-10-12 21:52:02 UTC (rev 342)
@@ -411,3 +411,8 @@
Type: boolean
Default: false
Description: for internal use.
+
+Template: dbconfig-common/internal/skip-preseed
+Type: boolean
+Default: false
+Description: for internal use.
Modified: trunk/dpkg/common
===================================================================
--- trunk/dpkg/common 2006-10-10 09:49:59 UTC (rev 341)
+++ trunk/dpkg/common 2006-10-12 21:52:02 UTC (rev 342)
@@ -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 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 internal/skip-preseed"
# 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"
@@ -208,9 +208,18 @@
### the "Debconf is Not a Registry" dilemma.
###
dbc_preseed_package_debconf(){
+ local skip_preseed
dbc_debug "dbc_preseed_package_debconf() $@"
_dbc_sanity_check package || dbc_install_error
+ # if we've pre-configured the package and are running config
+ # for the second time via dpkg, then there is no on-disk
+ # configuration to preseed with, and we would in fact nuke
+ # the previous answers. so we check to avoid that.
+ db_get $dbc_package/skip-preseed && skip_preseed="$RET"
+ db_reset $dbc_package/skip-preseed
+ if [ "$skip_preseed" = "true" ]; then return 0; fi
+
# set whether they want our help
db_set $dbc_package/dbconfig-install "$dbc_install"
db_set $dbc_package/dbconfig-upgrade "$dbc_upgrade"
More information about the Dbconfig-common-changes
mailing list