After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 622897 - Migrate from dbus-glib to glib's GDBus
Migrate from dbus-glib to glib's GDBus
Status: RESOLVED FIXED
Product: evolution-rss
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: evolution-rss-maint
evolution-rss-maint
Depends on:
Blocks: 622871
 
 
Reported: 2010-06-27 10:59 UTC by André Klapper
Modified: 2010-11-05 21:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description André Klapper 2010-06-27 10:59:13 UTC
For GLib 2.25.5 GDBus D-Bus support was merged, providing an API to replace dbus-glib.

See http://library.gnome.org/devel/gio/unstable/gdbus.html and http://library.gnome.org/devel/gio/unstable/ch28.html .

According to a quick grep this module seems to use dbus-glib:

./evolution-rss/configure.ac:	PKG_CHECK_MODULES(DBUS, dbus-glib-1, [have_dbus=yes], [have_dbus=no])
Comment 1 Gil Forcada 2010-08-28 21:06:01 UTC
It seems that not only evolution-rss depends on dbus-glib, the evolution shell itself does also, see the below trace.

Should this bug be moved to evolution?


make[3]: Entering directory `/opt/gnome-gil/source/evolution/shell'
make[4]: Entering directory `/opt/gnome-gil/source/evolution/shell'
  CC     libeshell_la-e-shell.lo
  CC     libeshell_la-e-shell-backend.lo
  CC     libeshell_la-e-shell-content.lo
  CC     libeshell_la-e-shell-enumtypes.lo
  CC     libeshell_la-e-shell-meego.lo
  CC     libeshell_la-e-shell-searchbar.lo
  CC     libeshell_la-e-shell-settings.lo
  CC     libeshell_la-e-shell-sidebar.lo
  CC     libeshell_la-e-shell-switcher.lo
  CC     libeshell_la-e-shell-taskbar.lo
  CC     libeshell_la-e-shell-utils.lo
  CC     libeshell_la-e-shell-view.lo
  CC     libeshell_la-e-shell-window.lo
  CC     libeshell_la-e-shell-window-private.lo
  CC     libeshell_la-e-shell-migrate.lo
  CC     libeshell_la-e-shell-window-actions.lo
  CC     libeshell_la-es-event.lo
  CCLD   libeshell.la
  CC     evolution-main.o
main.c:45:28: error: dbus/dbus-glib.h: The file or folder doesn't exist
make[4]: *** [evolution-main.o] Error 1
make[4]: Leaving directory `/opt/gnome-gil/source/evolution/shell'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/gnome-gil/source/evolution/shell'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/gnome-gil/source/evolution/shell'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/gnome-gil/source/evolution'
make: *** [all] Error 2
Comment 2 André Klapper 2010-08-28 21:08:31 UTC
Gil: Which version? Evo itself should be fixed in Git according to bug 622912
Comment 3 Gil Forcada 2010-08-29 09:07:39 UTC
André: git master built with jhbuild targetting gnome-2.32 moduleset. I'm re-opening bug 622912.

Greping on evolution still shows some dbus/dbus-glib traces:

gil@molinet:evolution (master) $ grep -R "dbus/dbus-glib" *
calendar/gui/alarm-notify/notify-main.c:35:#include <dbus/dbus-glib.h>
capplet/anjal-settings-main.c:40:#include <dbus/dbus-glib.h>
shell/main.c:45:#include <dbus/dbus-glib.h>
Comment 4 Lucian Langa 2010-11-05 20:43:46 UTC
Fixed in the following commit:
http://git.gnome.org/browse/evolution-rss/commit/?id=bd46fd70603ab085edf07a5862be8bccba245f06
Comment 5 Christian Persch 2010-11-05 21:03:35 UTC
+ g_variant_get (parameters, "((s))", &url);

This looks rather unusual... why the double wrapped string, instead of just using a simple tuple? I guess this comes from here:
+ builder = g_variant_builder_new (G_VARIANT_TYPE_TUPLE);
+
/* Appends the data as an argument to the message */
- dbus_message_append_args (message,
-//#if DBUS_VERSION >= 310
- DBUS_TYPE_STRING, &data,
-//#else
-// DBUS_TYPE_STRING, data,
-//#endif
- DBUS_TYPE_INVALID);
+ g_variant_builder_add (builder, "(s)", data);

but there's no clue why this is done... 

+ feed->feed_url = g_strdup(url);

You already got a string copy with the g_variant_get (..., &url), why make another one?

+ if (feed->feed_url && strlen(feed->feed_url)) {

feed->feed_url will always be != NULL here.
Comment 6 Lucian Langa 2010-11-05 21:50:26 UTC
Thanks for pointing out the issues.
Commit http://git.gnome.org/browse/evolution-rss/commit/?id=0ac7e02b4551bd271e5e17c73eb6975173abc6b9 should fix this issues.