Hello community,
here is the log from the commit of package libgda
checked in at Mon Oct 6 18:02:08 CEST 2008.
--------
--- GNOME/libgda/libgda.changes 2008-09-05 02:14:59.000000000 +0200
+++ /mounts/work_src_done/STABLE/libgda/libgda.changes 2008-10-04 23:47:02.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Oct 05 21:39:15 CEST 2008 - mboman@suse.de
+
+- Backrev to version 3.1.2:
+ + 3.99.3 is unstable and should not have gone in.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
libgda-3.99.3.tar.bz2
New:
----
libgda-3.1.2.tar.bz2
libgda-return.patch
libgda-vfsmonitor.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libgda.spec ++++++
--- /var/tmp/diff_new_pack.P20365/_old 2008-10-06 18:01:02.000000000 +0200
+++ /var/tmp/diff_new_pack.P20365/_new 2008-10-06 18:01:02.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package libgda (Version 3.99.3)
+# spec file for package libgda (Version 3.1.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,20 +19,18 @@
Name: libgda
-BuildRequires: db-devel fdupes gcc-c++ glib2-devel gnome-common gtk-doc
-BuildRequires: intltool libgcrypt-devel libxslt-devel mysql mysql-devel
-BuildRequires: openldap2-devel perl-XML-Parser popt-devel postgresql-devel
-BuildRequires: readline-devel scrollkeeper sgml-skel sqlite3-devel
-BuildRequires: unixODBC-devel
+BuildRequires: db-devel fdupes gcc-c++ glib2-devel gnome-common gnome-vfs2-devel gtk-doc intltool libgcrypt-devel libxslt-devel mysql mysql-devel openldap2-devel perl-XML-Parser popt-devel postgresql-devel readline-devel scrollkeeper sgml-skel sqlite3-devel unixODBC-devel
License: GPL v2 or later; LGPL v2.1 or later
Group: Productivity/Databases/Clients
-Version: 3.99.3
-Release: 1
+Version: 3.1.2
+Release: 82
Summary: GNU Data Access (GDA) Library
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.gnome-db.org/
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.1/%{name}-%{version}.tar.bz2
Patch: libgda-1.0.3-ncurses.patch
+Patch1: libgda-return.patch
+Patch2: libgda-vfsmonitor.patch
Requires: %{name}-lang = %{version}
Requires: %{name}-3_0 = %{version}
@@ -415,6 +413,8 @@
%prep
%setup -q
%patch
+%patch1
+%patch2
%build
autoreconf -f -i
@@ -533,6 +533,9 @@
%{_libdir}/libgda-3.0/providers/libgda-sqlite.so
%changelog
+* Sun Oct 05 2008 mboman@suse.de
+- Backrev to version 3.1.2:
+ + 3.99.3 is unstable and should not have gone in.
* Fri Sep 05 2008 mboman@novell.com
- Update to version 3.99.3:
- Lots of bug fixed, memory leaks fixes and general performance
++++++ libgda-3.99.3.tar.bz2 -> libgda-3.1.2.tar.bz2 ++++++
GNOME/libgda/libgda-3.99.3.tar.bz2 /mounts/work_src_done/STABLE/libgda/libgda-3.1.2.tar.bz2 differ: byte 11, line 1
++++++ libgda-return.patch ++++++
--- tools/gda-config-tool.c.orig 2008-05-05 21:03:12.000000000 +0200
+++ tools/gda-config-tool.c 2008-05-05 21:03:50.000000000 +0200
@@ -1414,6 +1414,7 @@ display_provider (gpointer data, gpointe
g_string_free (str, TRUE);
g_print ("Location: %s\n", info->location);
g_print ("---\n");
+ return 0;
}
static gboolean
@@ -1473,7 +1474,7 @@ list_datasources (const gchar *option_na
datasources = gda_config_get_data_source_list ();
if (datasources == NULL){
g_print ("No datasources configured!\n");
- return;
+ return 0;
}
g_print("---Datasources list---\n");
--- tools/html.c.orig 2008-05-05 21:04:04.000000000 +0200
+++ tools/html.c 2008-05-05 21:07:19.000000000 +0200
@@ -626,4 +626,5 @@ html_render_data_model_all (xmlNodePtr p
html_render_data_model (parent, model);
+ return parent;
}
--- testing/html.c.orig 2008-05-05 21:19:45.000000000 +0200
+++ testing/html.c 2008-05-05 21:19:58.000000000 +0200
@@ -626,4 +626,5 @@ html_render_data_model_all (xmlNodePtr p
html_render_data_model (parent, model);
+ return parent;
}
++++++ libgda-vfsmonitor.patch ++++++
http://bugzilla.gnome.org/show_bug.cgi?id=486021
================================================================================
--- configure.in
+++ configure.in
@@ -82,6 +82,7 @@
gthread-2.0 >= req_ver_glib
gmodule-2.0 >= req_ver_glib
libxml-2.0
+ gnome-vfs-2.0
])
LIBGDA_CFLAGS="$LIBGDA_CFLAGS -DLIBGDA_ABI_NAME=$LIBGDA_ABI_NAME"
AC_SUBST(LIBGDA_CFLAGS)
@@ -116,29 +117,6 @@
AC_SUBST(SOPREFIX)
dnl ******************************
-dnl Checking for FAM or gamin
-dnl ******************************
-FAM_LIBS=
-FAM_CFLAGS=
-FAM_MISSING_WARNING="Libgda depends on FAM to provide notification when configuration files are changed, without FAM support any application using Libgda will have to be restarted when configuration files are changed to take into account those changes"
-PKG_CHECK_MODULES(GAMIN, gamin >= 0.1.8, have_fam=yes, have_fam=no)
-if test x"$have_fam" = "xyes"
-then
- FAM_CFLAGS="$GAMIN_CFLAGS"
- FAM_LIBS="$GAMIN_LIBS"
- AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
-else
- AC_CHECK_LIB(fam, FAMOpen,
- [AC_CHECK_HEADERS(fam.h,
- [AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
- FAM_LIBS="-lfam"],
- AC_MSG_WARN(*** FAM support will not be built (header files not found) $FAM_MISSING_WARNING ***))],
- AC_MSG_WARN(*** FAM support will not be built (FAM library not found) $FAM_MISSING_WARNING ***))
-fi
-AC_SUBST(FAM_LIBS)
-AC_SUBST(FAM_CFLAGS)
-
-dnl ******************************
dnl Checks for libgcrypt
dnl ******************************
LIBGCRYPT_CFLAGS=""
--- libgda/Makefile.am
+++ libgda/Makefile.am
@@ -11,7 +11,6 @@
-I$(top_srcdir) \
-I$(top_builddir) \
$(LIBGDA_CFLAGS) \
- $(FAM_CFLAGS) \
$(BDB_CFLAGS) \
$(GNOMEVFS_CFLAGS) \
$(LIBGCRYPT_CFLAGS)
@@ -229,7 +228,7 @@
handlers/libgda_handlers-3.0.la \
binreloc/libgda_binreloc-3.0.la \
$(top_builddir)/libsql/libgdasql-3.0.la \
- $(LIBGDA_LIBS) $(FAM_LIBS) \
+ $(LIBGDA_LIBS) \
$(BDB_LIBS) $(GNOMEVFS_LIBS) $(LIBGCRYPT_LIBS)
gdaincludedir=$(includedir)/libgda-$(GDA_ABI_MAJOR_VERSION).$(GDA_ABI_MINOR_VERSION)/libgda
--- libgda/gda-config.c
+++ libgda/gda-config.c
@@ -36,13 +36,8 @@
#include
#include
#include
-#ifdef HAVE_FAM
-#include
-#include
-#include
-#include
-#include
-#endif
+#include
+#include
#ifdef G_OS_WIN32
#include
#endif
@@ -88,22 +83,16 @@
static gboolean dsn_list_only_in_mem = FALSE;
/*
- * FAM delcarations and static variables
+ * File monitoring declarations and static variables
*/
-#ifdef HAVE_FAM
-static FAMConnection *fam_connection = NULL;
-static gint fam_watch_id = 0;
-static gboolean lock_fam = FALSE;
-static FAMRequest *fam_conf_user = NULL;
-static FAMRequest *fam_conf_global = NULL;
-static time_t last_mtime = 0;
-static time_t last_ctime = 0;
-static off_t last_size = 0;
-
-static gboolean fam_callback (GIOChannel *source, GIOCondition condition, gpointer data);
-static void fam_lock_notify ();
-static void fam_unlock_notify ();
-#endif
+static GnomeVFSMonitorHandle *monitor_global, *monitor_user;
+static gboolean monitor_lock;
+
+static void monitor_callback (GnomeVFSMonitorHandle *handle,
+ const gchar *monitor_uri,
+ const gchar *info_uri,
+ GnomeVFSMonitorEventType event_type,
+ gpointer user_data);
/*
* Private functions
@@ -280,12 +269,12 @@
*/
if (! config_client) {
GDA_CONFIG_LOCK ();
- guint len = 0;
+ gsize len = 0;
gchar *full_file = NULL;
gchar *user_config = NULL;
+ gchar *global_config = NULL;
gboolean has_user_config = FALSE;
gchar *memonly;
- gchar *fname;
config_client = g_new0 (GdaConfigClient, 1);
xmlKeepBlanksDefault(0);
@@ -307,7 +296,7 @@
}
/* global config file name */
- fname = gda_gbr_get_file_path (GDA_ETC_DIR, LIBGDA_ABI_NAME, "config", NULL);
+ global_config = gda_gbr_get_file_path (GDA_ETC_DIR, LIBGDA_ABI_NAME, "config", NULL);
has_user_config = g_get_home_dir () ? TRUE : FALSE;
if (has_user_config)
@@ -316,7 +305,7 @@
{
/* compute system wide rights */
FILE *file;
- file = fopen (fname, "a");
+ file = fopen (global_config, "a");
if (file) {
can_modify_global_conf = TRUE;
#ifdef GDA_DEBUG_NO
@@ -332,52 +321,36 @@
}
}
-#ifdef HAVE_FAM
- if (!fam_connection) {
- /* FAM init */
- GIOChannel *ioc;
- int res;
-
-#ifdef GDA_DEBUG_NO
- g_print ("Using FAM to monitor configuration files changes.\n");
-#endif
- fam_connection = g_malloc0 (sizeof (FAMConnection));
- if (FAMOpen2 (fam_connection, "libgnomedb user") != 0) {
- g_print ("FAMOpen failed, FAMErrno=%d\n", FAMErrno);
- g_free (fam_connection);
- fam_connection = NULL;
- }
- else {
- ioc = g_io_channel_unix_new (FAMCONNECTION_GETFD(fam_connection));
- fam_watch_id = g_io_add_watch (ioc,
- G_IO_IN | G_IO_HUP | G_IO_ERR,
- fam_callback, NULL);
-
- fam_conf_global = g_new0 (FAMRequest, 1);
- res = FAMMonitorFile (fam_connection, fname, fam_conf_global,
- GINT_TO_POINTER (TRUE));
-#ifdef GDA_DEBUG_NO
- g_print ("Monitoring changes on file %s: %s\n", fname, res ? "ERROR" : "Ok");
+ if (!monitor_global) {
+ GnomeVFSResult res;
+ char *uri;
+
+#ifdef GDA_DEBUG
+ g_print ("Using GNOME-VFS to monitor configuration files changes.\n");
#endif
-
- if (has_user_config) {
- fam_conf_user = g_new0 (FAMRequest, 1);
- res = FAMMonitorFile (fam_connection, user_config, fam_conf_user,
- GINT_TO_POINTER (FALSE));
-#ifdef GDA_DEBUG_NO
- g_print ("Monitoring changes on file %s: %s\n",
- user_config, res ? "ERROR" : "Ok");
+
+ uri = gnome_vfs_get_uri_from_local_path (global_config);
+ res = gnome_vfs_monitor_add (&monitor_global, uri, GNOME_VFS_MONITOR_FILE, monitor_callback, NULL);
+ g_free (uri);
+#ifdef GDA_DEBUG
+ g_print ("Monitoring changes on file %s: %s\n",
+ fam_conf_global, res ? "ERROR" : "Ok");
#endif
- }
- }
- }
+ if (has_user_config) {
+ uri = gnome_vfs_get_uri_from_local_path (user_config);
+ res = gnome_vfs_monitor_add (&monitor_user, uri, GNOME_VFS_MONITOR_FILE, monitor_callback, NULL);
+ g_free (uri);
+#ifdef GDA_DEBUG
+ g_print ("Monitoring changes on file %s: %s\n",
+ user_config, res ? "ERROR" : "Ok");
#endif
+ }
/*
* load system wide config
*/
- if (g_file_get_contents (fname, &full_file, &len, NULL)){
+ if (g_file_get_contents (global_config, &full_file, &len, NULL)){
GList *list;
config_client->global = gda_config_parse_config_file (full_file, len);
g_free (full_file);
@@ -392,7 +365,7 @@
if (! has_user_config) {
/* this can occur on win98, and maybe other win32 platforms */
- g_free (fname);
+ g_free (global_config);
GDA_CONFIG_UNLOCK ();
return config_client;
}
@@ -475,11 +448,12 @@
g_warning ("Config file is not readable.");
}
g_free (user_config);
- g_free (fname);
+ g_free (global_config);
#ifdef GDA_DEBUG_NO
dump_config_client ();
#endif
GDA_CONFIG_UNLOCK ();
+ }
}
return config_client;
@@ -487,88 +461,50 @@
static void gda_config_client_reset ();
-#ifdef HAVE_FAM
-static gboolean
-fam_callback (GIOChannel *source, GIOCondition condition, gpointer data)
+static void
+monitor_callback (GnomeVFSMonitorHandle *handle,
+ const gchar *monitor_uri,
+ const gchar *info_uri,
+ GnomeVFSMonitorEventType event_type,
+ gpointer user_data)
{
- gboolean res = TRUE;
+ gboolean is_global;
- GDA_CONFIG_LOCK ();
- while (fam_connection && FAMPending (fam_connection)) {
- FAMEvent ev;
- gboolean is_global;
-
- if (FAMNextEvent (fam_connection, &ev) != 1) {
- FAMClose (fam_connection);
- g_free (fam_connection);
- g_source_remove (fam_watch_id);
- fam_watch_id = 0;
- fam_connection = NULL;
- GDA_CONFIG_UNLOCK ();
- return FALSE;
- }
-
- if (lock_fam)
- continue;
+ if (monitor_lock)
+ return;
- is_global = GPOINTER_TO_INT (ev.userdata);
- switch (ev.code) {
- case FAMChanged: {
- struct stat stat;
- if (lstat (ev.filename, &stat))
- break;
- if ((stat.st_mtime != last_mtime) ||
- (stat.st_ctime != last_ctime) ||
- (stat.st_size != last_size)) {
- last_mtime = stat.st_mtime;
- last_ctime = stat.st_ctime;
- last_size = stat.st_size;
- }
- else
- break;
- }
- case FAMDeleted:
- case FAMCreated:
-#ifdef GDA_DEBUG_NO
- g_print ("Reloading config files (%s config has changed)\n", is_global ? "global" : "user");
+ is_global = GPOINTER_TO_INT (user_data);
+ switch (event_type) {
+ case GNOME_VFS_MONITOR_EVENT_CHANGED:
+ case GNOME_VFS_MONITOR_EVENT_DELETED:
+ case GNOME_VFS_MONITOR_EVENT_CREATED:
+#ifdef GDA_DEBUG
+ g_print ("Reloading config files (%s config has changed)\n", is_global ? "global" : "user");
#endif
- GDA_CONFIG_LOCK ();
- gda_config_client_reset ();
- g_free (config_client);
- config_client = NULL;
- /* config_client will be re-created next time a gda_config* call is made */
- do_notify (NULL);
- GDA_CONFIG_UNLOCK ();
- break;
- case FAMAcknowledge:
- case FAMStartExecuting:
- case FAMStopExecuting:
- case FAMExists:
- case FAMEndExist:
- case FAMMoved:
- /* Not supported */
- break;
- }
+ gda_config_client_reset ();
+ g_free (config_client);
+ config_client = NULL;
+ /* config_client will be re-created next time a gda_config* call is made */
+ do_notify (NULL);
+ break;
+ default:
+ /* Not supported */
+ break;
}
-
- GDA_CONFIG_UNLOCK ();
- return res;
}
static void
-fam_lock_notify ()
+monitor_lock_notify ()
{
- lock_fam = TRUE;
+ monitor_lock = TRUE;
}
static void
-fam_unlock_notify ()
+monitor_unlock_notify ()
{
- lock_fam = FALSE;
+ monitor_lock = FALSE;
}
-#endif
-
static GdaConfigSection *
gda_config_search_section (GList *sections, const gchar *path)
{
@@ -785,14 +721,10 @@
}
user_config = g_strdup_printf ("%s%s", g_get_home_dir (), LIBGDA_USER_CONFIG_FILE);
-#ifdef HAVE_FAM
- fam_lock_notify ();
-#endif
+ monitor_lock_notify ();
if (xmlSaveFormatFile (user_config, doc, TRUE) == -1)
g_warning ("Error saving config data to '%s'", user_config);
-#ifdef HAVE_FAM
- fam_unlock_notify ();
-#endif
+ monitor_unlock_notify ();
g_free (user_config);
xmlFreeDoc (doc);
@@ -817,9 +749,7 @@
}
}
-#ifdef HAVE_FAM
- fam_lock_notify ();
-#endif
+ monitor_lock_notify ();
/* global config file name */
gchar *fname;
fname = gda_gbr_get_file_path (GDA_ETC_DIR, LIBGDA_ABI_NAME, "config", NULL);
@@ -827,9 +757,7 @@
if (xmlSaveFormatFile (fname, doc, TRUE) == -1)
g_warning ("Error saving config data to '%s'", user_config);
g_free (fname);
-#ifdef HAVE_FAM
- fam_unlock_notify ();
-#endif
+ monitor_unlock_notify ();
xmlFreeDoc (doc);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org