[Fusionforge-commits] r16247 - in branches/Branch_5_1: . src/deb-specific src/debian src/debian/dsf-in

Roland Mas lolando at fusionforge.org
Fri Sep 21 16:06:28 CEST 2012


Author: lolando
Date: 2012-09-21 16:06:27 +0200 (Fri, 21 Sep 2012)
New Revision: 16247

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/src/deb-specific/install-db.sh
   branches/Branch_5_1/src/debian/changelog
   branches/Branch_5_1/src/debian/dsf-in/db-postgresql.postinst.dsfh-in
   branches/Branch_5_1/src/debian/dsf-in/db-postgresql.prerm
Log:
Fail configuration of the -db-postgresql package if no database is available

Modified: branches/Branch_5_1/src/deb-specific/install-db.sh
===================================================================
--- branches/Branch_5_1/src/deb-specific/install-db.sh	2012-09-21 12:04:28 UTC (rev 16246)
+++ branches/Branch_5_1/src/deb-specific/install-db.sh	2012-09-21 14:06:27 UTC (rev 16247)
@@ -25,9 +25,8 @@
                 export pg_hba_dir=/var/lib/pgsql/data/
 		return
         fi
-        echo "No pg_hba_dir found"
-        echo "exiting without error, but gforge db will not work"
-        exit 0
+        echo "No pg_hba_dir found — exiting with error"
+        exit 1
 }
 
 # this function export in var pg_version the version of postgresql
@@ -47,13 +46,8 @@
 		return
         fi
         echo "No database found online on port 5432"
-        echo "Couldn't initialize or upgrade gforge database."
-        echo "Please see postgresql documentation"
-        echo "and run dpkg-reconfigure -plow gforge-db-postgresql"
-        echo "once the problem is solved"
-        echo "exiting without error, but gforge db will not work"
-        echo "right now"
-        exit 0
+        echo "Couldn't initialize or upgrade gforge database"
+        exit 1
 }
 
 

Modified: branches/Branch_5_1/src/debian/changelog
===================================================================
--- branches/Branch_5_1/src/debian/changelog	2012-09-21 12:04:28 UTC (rev 16246)
+++ branches/Branch_5_1/src/debian/changelog	2012-09-21 14:06:27 UTC (rev 16247)
@@ -3,12 +3,15 @@
   [ Roland Mas ]
   * Reinstate code running the Mediawiki SQL initialisation code from the
     package's postinst.
+  * Fail configuration of the -db-postgresql package if no database is
+    available, to prevent other packages from breaking things due to
+    misconfiguration.
 
   [ Thorsten Glaser ]
   * SECURITY: Upon user deletion, remove their Unix account as well
   * SECURITY: Do not disclose inaccessible groups on user_home/toplist
 
- -- Thorsten Glaser <tg at mirbsd.de>  Mon, 03 Sep 2012 14:07:16 +0200
+ -- Roland Mas <lolando at debian.org>  Fri, 21 Sep 2012 16:05:28 +0200
 
 fusionforge (5.1.1-8) unstable; urgency=low
 

Modified: branches/Branch_5_1/src/debian/dsf-in/db-postgresql.postinst.dsfh-in
===================================================================
--- branches/Branch_5_1/src/debian/dsf-in/db-postgresql.postinst.dsfh-in	2012-09-21 12:04:28 UTC (rev 16246)
+++ branches/Branch_5_1/src/debian/dsf-in/db-postgresql.postinst.dsfh-in	2012-09-21 14:06:27 UTC (rev 16247)
@@ -17,13 +17,8 @@
 		export pg_hba_dir=/etc/postgresql/${pg_version}/main
 	else
 		echo "No database found online on port 5432"
-		echo "Couldn't initialize or upgrade @OLDPACKAGE@ database."
-		echo "Please see postgresql documentation"
-		echo "and run dpkg-reconfigure -plow @OLDPACKAGE at -db-postgresql"
-		echo "once the problem is solved"
-		echo "exiting without error, but @OLDPACKAGE@ db will not work"
-		echo "right now"
-		exit 0
+		echo "Couldn't initialize or upgrade @OLDPACKAGE@ database"
+		exit 1
 	fi
 else
     	export pg_hba_dir=/etc/postgresql

Modified: branches/Branch_5_1/src/debian/dsf-in/db-postgresql.prerm
===================================================================
--- branches/Branch_5_1/src/debian/dsf-in/db-postgresql.prerm	2012-09-21 12:04:28 UTC (rev 16246)
+++ branches/Branch_5_1/src/debian/dsf-in/db-postgresql.prerm	2012-09-21 14:06:27 UTC (rev 16247)
@@ -16,13 +16,9 @@
 	then 
 		export pg_hba_dir=/etc/postgresql/${pg_version}/main
 	else
-		echo "No database found online on port 5432"
-		echo "Couldn't initialize or upgrade @OLDPACKAGE@ database."
-		echo "Please see postgresql documentation"
-		echo "and run dpkg-reconfigure -plow @OLDPACKAGE at -db-postgresql"
-		echo "once the problem is solved"
-		echo "exiting without error, but @OLDPACKAGE@ db will not work"
-		echo "right now"
+		echo "No database found online on port 5432."
+		echo "Assuming the database was dropped and no action is needed."
+		echo "Exiting without error, but make sure there are no leftovers."
 		exit 0
 	fi
 else




More information about the Fusionforge-commits mailing list