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

Sean Finney seanius at costa.debian.org
Sat Aug 5 08:01:44 CEST 2006


Author: seanius
Date: 2006-08-05 06:01:43 +0000 (Sat, 05 Aug 2006)
New Revision: 285

Modified:
   trunk/debian/changelog
   trunk/dpkg/config
   trunk/dpkg/prerm
Log:
more fixes and info about readonly support

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-08-03 02:10:21 UTC (rev 284)
+++ trunk/debian/changelog	2006-08-05 06:01:43 UTC (rev 285)
@@ -3,10 +3,13 @@
   * NOT RELEASED YET
 
   [ sean finney ]
-  * incorporate the "frontend" feature for read-only packages.
+  * incorporate the "frontend" feature for read-only packages, where
+    someone may want to ask the questions but not take the actions.
+    see docs for details.  thanks to Thomas Huriaux and Michael
+    Ablassmeier for the prompting on this one.  closes: #373188.
   * merge debian/TODO and TODO into just TODO.
 
- -- sean finney <sean at localhost>  Wed,  2 Aug 2006 18:13:51 -0700
+ -- sean finney <seanius at debian.org>  Fri, 04 Aug 2006 23:01:01 -0700
 
 dbconfig-common (1.8.18) unstable; urgency=low
 

Modified: trunk/dpkg/config
===================================================================
--- trunk/dpkg/config	2006-08-03 02:10:21 UTC (rev 284)
+++ trunk/dpkg/config	2006-08-05 06:01:43 UTC (rev 285)
@@ -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 migrating
+	local f db happy default_dbtype host newhost port oldhosts authmethod_admin do_config _preconf_list _s _t STATE iformat ifile install_question migrating userdb_prio
 	. /usr/share/dbconfig-common/dpkg/common
 	dbc_debug "(config) dbc_go() $@"
 
@@ -32,7 +32,16 @@
 		migrating="yes"
 	fi
 
+	# if this is a frontend app, then the user/db type questions get
+	# a raised priority
+	userdb_prio="low"
+	if [ "$dbc_frontend" ]; then
+		userdb_prio="medium"
+	else
+		userdb_prio="low"
+	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"
@@ -45,8 +54,10 @@
 	fi
 
 	# and start our beautiful state-machine
-	# if we're migrating from a non-dbc version, skip the first question
-	if [ ! "$migrating" ]; then
+	# we start in STATE=1 (install_question) in all but two situations:
+	#	- we're migrating from a previous non-dbc version
+	#   - we're installing a frontend/readonly app
+	if [ ! "$migrating" ] && [ ! "$dbc_frontend" ]; then
 		STATE=1
 	else
 		STATE=2
@@ -327,20 +338,18 @@
 	9)
 		if echo "$dbc_authenticated_dbtypes" | grep -q "$dbc_dbtype"; then
 
-			# who's the admin user (is there any reason to even ask this?)
-			# TODO: should there be a difference between the local and 
-			# remote admin?
-			db_input low $dbc_package/$dbc_dbtype/admin-user || true
+			# who's the admin user
+			db_input $userdb_prio $dbc_package/$dbc_dbtype/admin-user || true
 			if [ "$need_adminpw" != "false" ]; then
 				dbc_get_admin_pass
 			fi
-			db_input low $dbc_package/db/app-user || true
+			db_input $userdb_prio $dbc_package/db/app-user || true
 			dbc_get_app_pass
 
 		fi
 
 		# get the name of the database to use
-		db_input low $dbc_package/db/dbname || true
+		db_input $userdb_prio $dbc_package/db/dbname || true
 	;;
 	# * - end state
 	*)

Modified: trunk/dpkg/prerm
===================================================================
--- trunk/dpkg/prerm	2006-08-03 02:10:21 UTC (rev 284)
+++ trunk/dpkg/prerm	2006-08-05 06:01:43 UTC (rev 285)
@@ -22,7 +22,7 @@
 		need_admin_pw=""
 	fi 
 
-	if [ "$dbc_command" = "remove" ]; then
+	if [ "$dbc_command" = "remove" ] && [ ! "$dbc_frontend" ]; then
 		###
 		### ask the admin if we should help with removal
 		###




More information about the Dbconfig-common-changes mailing list