[Dbconfig-common-changes] [dbconfig-common] r409 - in trunk: . debian

Sean Finney seanius at alioth.debian.org
Sat Jun 23 14:03:12 UTC 2007


tags 429841 pending
tags 429854 pending
thanks

Author: seanius
Date: 2007-06-23 14:03:12 +0000 (Sat, 23 Jun 2007)
New Revision: 409

Modified:
   trunk/dbconfig-generate-include
   trunk/debian/changelog
Log:
couple d-g-i patches from zack

Modified: trunk/dbconfig-generate-include
===================================================================
--- trunk/dbconfig-generate-include	2007-06-23 14:02:54 UTC (rev 408)
+++ trunk/dbconfig-generate-include	2007-06-23 14:03:12 UTC (rev 409)
@@ -381,16 +381,25 @@
 		echo "unable to create temporary file $sedtmp" >&2
 		exit 1
 	fi
+	# we do not want _DBC_DBSERVER_ to be expanded to "" (which means "use
+	# the best available method to connect to the local db): expand it to
+	# "localhost" if needed
+	if [ -z "$dbc_dbserver" ] ; then
+		dbc_dballow="localhost"
+	else
+		dbc_dballow="$dbc_dbserver"
+	fi
 	cat << EOF > "$sedtmp"
 s/^\(.*\)_DBC_DBUSER_/${comment_dbuser}\1`sed_rhs_escape $dbc_dbuser`/g
 s/^\(.*\)_DBC_DBPASS_/${comment_dbpass}\1`sed_rhs_escape $dbc_dbpass`/g
 s/^\(.*\)_DBC_BASEPATH_/${comment_basepath}\1`sed_rhs_escape $dbc_basepath`/g
 s/^\(.*\)_DBC_DBNAME_/${comment_dbname}\1`sed_rhs_escape $dbc_dbname`/g
-s/^\(.*\)_DBC_DBSERVER_/${comment_dbserver}\1`sed_rhs_escape $dbc_dbserver`/g
+s/^\(.*\)_DBC_DBSERVER_/${comment_dbserver}\1`sed_rhs_escape $dbc_dballow`/g
 s/^\(.*\)_DBC_DBPORT_/${comment_dbport}\1`sed_rhs_escape $dbc_dbport`/g
 s/^\(.*\)_DBC_DBTYPE_/${comment_dbtype}\1`sed_rhs_escape $dbc_dbtype`/g
 EOF
 	sed -f "$sedtmp" < "$template_infile" 
+	rm -f "$sedtmp"
 ;;
 esac
 

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2007-06-23 14:02:54 UTC (rev 408)
+++ trunk/debian/changelog	2007-06-23 14:03:12 UTC (rev 409)
@@ -8,6 +8,11 @@
     text is not yet marked translatable since i don't think it's final yet.
   * do some more under-the-hood stuff for multi-instance support in the up
     and coming webapps-common package.
+  * make sure the _DBC_DBSERVER_ substitution in d-g-i does not result in an 
+    empty string, as is done elsewhere.  thanks to Stefano Zacchiroli for
+    the patch (closes: #429841).
+  * clean up an extra tmpfile that wasn't being deleted by d-g-i, thanks
+    again to Stefano for the patch (closes: #429854).
 
  -- sean finney <seanius at debian.org>  Mon, 18 Jun 2007 18:15:29 +0100
 




More information about the Dbconfig-common-changes mailing list