[Dbconfig-common-changes] [dbconfig-common] r352 - in trunk: debian dpkg

Sean Finney seanius at alioth.debian.org
Mon Oct 30 12:55:42 CET 2006


Author: seanius
Date: 2006-10-30 12:55:41 +0100 (Mon, 30 Oct 2006)
New Revision: 352

Modified:
   trunk/debian/changelog
   trunk/dpkg/common
Log:
more preseed fixes

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-10-30 10:52:40 UTC (rev 351)
+++ trunk/debian/changelog	2006-10-30 11:55:41 UTC (rev 352)
@@ -2,8 +2,10 @@
 
   * NOT RELEASED YET
   * update package decscription to include mention of sqlite support.
+  * preseeding values were still being dropped if debconf priority
+    was set to >= high.  should be fixed now.
 
- -- sean finney <seanius at debian.org>  Mon, 23 Oct 2006 14:23:52 +0200
+ -- sean finney <seanius at debian.org>  Mon, 30 Oct 2006 12:30:19 +0100
 
 dbconfig-common (1.8.27) unstable; urgency=high
 

Modified: trunk/dpkg/common
===================================================================
--- trunk/dpkg/common	2006-10-30 10:52:40 UTC (rev 351)
+++ trunk/dpkg/common	2006-10-30 11:55:41 UTC (rev 352)
@@ -230,41 +230,64 @@
 
 	# set the dbtype
 	db_set $dbc_package/database-type "$dbc_dbtype"
-	
-	# a few db-specific things which shouldn't be set unless we know the dbtype
-	if [ ! "$dbc_dbtype" ]; then return 0 ; fi
 
+	# the following db-specific settings always need to be preseeded unless
+	# we specifically know we're not configuring for the given database type
+	#
+	# set the psql authentication method
+	if [ -z "$dbc_dbtype" ] || [ "$dbc_dbtype" = "pgsql" ]; then
+		if [ "$dbc_authmethod_admin" ]; then
+			db_set $dbc_package/pgsql/authmethod-admin "$dbc_authmethod_admin"
+		fi
+		if [ "$dbc_authmethod_user" ]; then
+			db_set $dbc_package/pgsql/authmethod-user "$dbc_authmethod_user"
+		fi
+	fi
+
+	# for authenticated-only dbtypes.  also catches empty (multidb) type.
 	if echo "$dbc_authenticated_dbtypes" | grep -q "$dbc_dbtype"; then
 		# set app user
-		db_set $dbc_package/db/app-user "$dbc_dbuser"
+		if [ "$dbc_dbuser" ]; then
+			db_set $dbc_package/db/app-user "$dbc_dbuser"
+		fi
 
 		# set the app user password
-		db_set $dbc_package/$dbc_dbtype/app-pass "$dbc_dbpass"
+		if [ "$dbc_dbpass" ]; then
+			db_set $dbc_package/$dbc_dbtype/app-pass "$dbc_dbpass"
+		fi
 
 		# set the database administrator name
-		db_set $dbc_package/$dbc_dbtype/admin-user "$dbc_dbadmin"
+		if [ "$dbc_dbadmin" ]; then
+			db_set $dbc_package/$dbc_dbtype/admin-user "$dbc_dbadmin"
+		fi
 	fi
 
+	# for remote-capable dbtypes
 	if echo "$dbc_remote_dbtypes" | grep -q "$dbc_dbtype"; then
 		# set the remote server/port
-		db_set $dbc_package/remote/host "$dbc_dbserver"
-		db_set $dbc_package/remote/port "$dbc_dbport"
+		if [ "$dbc_dbserver" ]; then
+			db_set $dbc_package/remote/host "$dbc_dbserver"
+		fi
+		if [ "$dbc_dbport" ]; then
+			db_set $dbc_package/remote/port "$dbc_dbport"
+		fi
 	fi
 
+	# for fs-based dbtypes only (sqlite)
 	if echo "$dbc_fs_dbtypes" | grep -qa "$dbc_dbtype"; then
 		# set the directory that the database file is found in
-		db_set $dbc_package/db/basepath "$dbc_basepath"
+		if [ "$dbc_basepath" ]; then
+			db_set $dbc_package/db/basepath "$dbc_basepath"
+		fi
 	fi
 
 	# set the name of the database to be created
-	db_set $dbc_package/db/dbname "$dbc_dbname"
+	if [ "$dbc_dbname" ]; then
+		db_set $dbc_package/db/dbname "$dbc_dbname"
+	fi
 
 	case $dbc_dbtype in
 	"pgsql")
-		# set the psql authentication method
-		db_set $dbc_package/pgsql/authmethod-admin "$dbc_authmethod_admin"
-		db_set $dbc_package/pgsql/authmethod-user "$dbc_authmethod_user"
-
 		# ident based auth doesn't need a password
 		if [ "$dbc_authmethod_admin" != "ident" ]; then
 			# set the database administrator pass




More information about the Dbconfig-common-changes mailing list