Bug 101075 - media kioslave doesn't compile against newest HAL/DBUS (0.5.0/0.31)
Summary: media kioslave doesn't compile against newest HAL/DBUS (0.5.0/0.31)
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: media (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jérôme Lodewyck
URL:
Keywords:
: 101275 101779 104767 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-08 03:13 UTC by Mark
Modified: 2006-06-09 21:20 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2005-03-08 03:13:16 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.4 
OS:                Linux

Just a heads-up more so than anything. DBUS 0.31 and HAL 0.5.0 were just released today and the APIs changed. The media:/ ioslave won't compile against these versions, obviously.
Comment 1 Kevin Ottens 2005-03-11 09:36:39 UTC
*** Bug 101275 has been marked as a duplicate of this bug. ***
Comment 2 Maksim Orlovich 2005-03-18 17:00:22 UTC
*** Bug 101779 has been marked as a duplicate of this bug. ***
Comment 3 Marek Lotke 2005-03-22 23:40:13 UTC
I've tried to patch media:/ slave. Seemed that changes are simple: "lib" prefix in function names and additional error parameters. So I have prepared an ugly patch. It does compile now, but does not work. kded is throwing a lot of messages like this:
8647: arguments to dbus_connection_send_with_reply_and_block() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 2728.
This is normally a bug in some application using the D-BUS library.
8647: assertion failed "(error) == NULL || dbus_error_is_set ((error))" file "dbus-bus.c" line 854 function send_no_return_values

I guess this means that dbus-031 has broken qt bindings...
Comment 4 Kevin Ottens 2005-03-25 23:47:24 UTC
If I remember correctly you have some work in progress for this one.
Comment 5 Jérôme Lodewyck 2005-03-26 09:57:14 UTC
CVS commit by lodewyck: 

- The halbackend now compiles against libhal-storage 0.5.
Backward compatibility with libhal-storage 0.4 is preserved for the time being.
This does not solve the dbus-qt bindings 0.31 problem.

- Complete Coolo's patch about kded crashing.

CCBUG:101075


  M +1 -11     Makefile.am   1.72
  M +9 -0      media/configure.in.in   1.8
  M +72 -57    media/kdedmodule/halbackend.cpp   1.9
  M +51 -1     media/kdedmodule/halbackend.h   1.2
Comment 6 Jérôme Lodewyck 2005-03-27 15:24:38 UTC
CVS commit by lodewyck: 

Updated the media kioslave HALBackend to the libhal API version 0.5

The HALBackend now works with HAL 0.5 / DBus 0.31, though this port is still
experimental. Compatibility with HAL 0.4.x / DBus 0.23 is preserved for the
time being, at least until HAL 0.6 is released.


CCBUG:101075


  M +32 -32    configure.in.in   1.9
  M +77 -20    kdedmodule/halbackend.cpp   1.10
  M +21 -2     kdedmodule/halbackend.h   1.3
Comment 7 Mark 2005-03-29 23:22:00 UTC
halbackend.cpp should really have

dbus_error_init (&error);

on line 112 or so.

It causes assert errors and falls back on the fstab backend otherwise.
Comment 8 Jérôme Lodewyck 2005-03-30 23:37:27 UTC
CVS commit by lodewyck: 

Added a missing dbus_error_init

CCBUG:101075


  M +1 -0      halbackend.cpp   1.11


--- kdebase/kioslave/media/kdedmodule/halbackend.cpp  #1.10:1.11
@@ -109,4 +109,5 @@ bool HALBackend::InitHal()
         kdDebug() << "Main loop integration" << endl;
         DBusError error;
+        dbus_error_init(&error);
         DBusConnection *dbus_connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
         if (dbus_error_is_set(&error))
Comment 9 Marek Lotke 2005-04-04 09:49:45 UTC
Just wanted to report that media:/ works now nicely. Thanks!
To make media:/ be notified about mounting I had to enable the call to libhal_device_property_watch_all in HALBackend::InitHal().
Only then when I added:
const char* mediumUdi = findMediumUdiFromUdi(udi);
if (!mediumUdi)
   return;
ResetProperties(mediumUdi);
in HALBackend::ModifyDevice media:/ icons reflect changing mount state.
Comment 10 Kevin Ottens 2005-04-29 14:27:41 UTC
*** Bug 104767 has been marked as a duplicate of this bug. ***
Comment 11 Stefan Schweizer 2005-06-27 21:08:36 UTC
Any progress on this? 

I tried patches myself but I always get "mediamanager not running" and no output on console when trying to start it :(
Any way to debug this? Recompiling with debug enabled does not produce any output either :(
Comment 12 Bryan Stine 2005-06-28 03:34:15 UTC
The patches seem to work here, but I cannot mount anything and the fallback-style fstab device management disappears completely, which I don't remember being the correct behavior.
Comment 13 Michael Rolf 2005-09-14 17:09:17 UTC
*** This bug has been confirmed by popular vote. ***
Comment 14 Marcus D. Hanwell 2005-09-16 02:01:02 UTC
Is there any progress with this patch? I have been trying to get KDE 3.4.2 to work with the new versions of hal/dbus without success so far.
Comment 15 Thiago Macieira 2005-09-16 03:04:28 UTC
KDE 3.4.2 will not be updated to use HAL 0.5. Please try KDE 3.5 beta 1, which should come out later this week.
Comment 16 Kevin Ottens 2006-06-09 21:20:55 UTC
Well, it compiles against dbus 0.6x and hal 0.5.x for a while now. Time to mark this report as resolved.