glom r1912 - in trunk: . docs/user-guide/es glom/libglom/connectionpool_backends



Author: murrayc
Date: Fri Feb 20 13:39:37 2009
New Revision: 1912
URL: http://svn.gnome.org/viewvc/glom?rev=1912&view=rev

Log:
2009-02-20  Murray Cumming  <murrayc murrayc com>

* configure.in:
* glom/libglom/connectionpool_backends/postgres_self.cc: Use the
postgres executable name instead of the deprecated postmaster
executable. Everything probably has that now.
Bug # 525108

Removed:
   trunk/docs/user-guide/es/legal.xml
Modified:
   trunk/ChangeLog
   trunk/config.h.in
   trunk/configure.in
   trunk/glom/libglom/connectionpool_backends/postgres_self.cc

Modified: trunk/config.h.in
==============================================================================
--- trunk/config.h.in	(original)
+++ trunk/config.h.in	Fri Feb 20 13:39:37 2009
@@ -88,7 +88,7 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Path to the postgres utilities, such as postmaster. */
+/* Path to the postgres utilities, such as postgres, pg_ctl, etc. */
 #undef POSTGRES_UTILS_PATH
 
 /* Define to 1 if you have the ANSI C header files. */

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri Feb 20 13:39:37 2009
@@ -150,12 +150,13 @@
 	)
 
 	AC_SUBST(POSTGRES_UTILS_PATH)
-	AC_DEFINE_UNQUOTED([POSTGRES_UTILS_PATH], ["${POSTGRES_UTILS_PATH}"], [Path to the postgres utilities, such as postmaster.])
+	AC_DEFINE_UNQUOTED([POSTGRES_UTILS_PATH], ["${POSTGRES_UTILS_PATH}"], [Path to the postgres utilities, such as postgres, pg_ctl, etc.])
 
 	if test $enable_client_only != yes; then
 		# Check that the supplied (or default) path really contains the postgres utilities:
-		AC_CHECK_PROG(HAVE_POSTMASTER, postmaster, yes, no, ${POSTGRES_UTILS_PATH})
-		if test "x$HAVE_POSTMASTER" = "xno"; then
+                # We check for pg_ctl rather than postgres, because postgres seem too general a name.
+		AC_CHECK_PROG(HAVE_POSTGRES, pg_ctl, yes, no, ${POSTGRES_UTILS_PATH})
+		if test "x$HAVE_POSTGRES" = "xno"; then
 		AC_MSG_ERROR([The postgres utilities could not be found in the path: ${POSTGRES_UTILS_PATH}. They are needed for self-hosting of Glom databases. Please make sure that Postgres is installed, and provide the correct path with the --with-postgres-utils option.])
 		fi
 	fi

Modified: trunk/glom/libglom/connectionpool_backends/postgres_self.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/postgres_self.cc	(original)
+++ trunk/glom/libglom/connectionpool_backends/postgres_self.cc	Fri Feb 20 13:39:37 2009
@@ -67,11 +67,8 @@
 static std::string get_path_to_postgres_executable(const std::string& program)
 {
 #ifdef G_OS_WIN32
-  // Use postgres on Windows, since the postgresql installer does not
-  // install the (deprecated) postmaster binary.
+  // Add the .exe extension on Windows:
   std::string real_program = program + EXEEXT;
-  if(program == "postmaster")
-    real_program = "postgres.exe";
     
   // Have a look at the bin directory of the application executable first.
   // The installer installs postgres there. postgres needs to be installed
@@ -155,7 +152,8 @@
 bool PostgresSelfHosted::check_postgres_is_available_with_warning()
 {
   //EXEEXT is defined in the Makefile.am
-  const std::string binpath = get_path_to_postgres_executable("postmaster");
+  const std::string binpath = get_path_to_postgres_executable("postgres");
+
   // TODO: At least on Windows we should probably also check for initdb and
   // pg_ctl. Perhaps it would also be a good idea to access these files as
   // long as glom runs so they cannot be (re)moved.
@@ -380,7 +378,7 @@
   // -D specifies the data directory.
   // -c config_file= specifies the configuration file
   // -k specifies a directory to use for the socket. This must be writable by us.
-  // POSTGRES_POSTMASTER_PATH is defined in config.h, based on the configure.
+  // POSTGRES_UTILS_PATH is defined in config.h, based on the configure.
   // Make sure to use double quotes for the executable path, because the
   // CreateProcess() API used on Windows does not support single quotes.
   const std::string command_postgres_start = "\"" + get_path_to_postgres_executable("postmaster") + "\" -D \"" + dbdir_data + "\" "
@@ -439,7 +437,7 @@
   // -D specifies the data directory.
   // -c config_file= specifies the configuration file
   // -k specifies a directory to use for the socket. This must be writable by us.
-  // POSTGRES_POSTMASTER_PATH is defined in config.h, based on the configure.
+  // POSTGRES_UTILS_PATH is defined in config.h, based on the configure.
   // We use "-m fast" instead of the default "-m smart" because that waits for clients to disconnect (and sometimes never succeeds).
   // TODO: Warn about connected clients on other computers? Warn those other users?
   // Make sure to use double quotes for the executable path, because the



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]