Bug 253388 - make hal optional
Summary: make hal optional
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: 2.0.1
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Michał Małek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 14:20 UTC by kleiner_otti
Modified: 2011-03-16 17:54 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.2


Attachments
patch to make hal optional in k3b-2.0.1 (936 bytes, patch)
2010-10-06 14:20 UTC, kleiner_otti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kleiner_otti 2010-10-06 14:20:03 UTC
Created attachment 52275 [details]
patch to make hal optional in k3b-2.0.1

Version:           2.0.1 (using KDE 4.4.5) 
OS:                Linux

k3b depends hard on hal, which is not needed in the case of non-removable
drives and/or kde's solid hardware detection.



Reproducible: Always
Comment 1 kleiner_otti 2010-12-02 16:20:53 UTC
@Sebastian: any comments?
Comment 2 Andreas Kuhl 2010-12-13 10:32:48 UTC
HAL became obsolete in the latest KDE SC 4.6 Betas. In fact, devicenotifier and powerdevil misbehave with HAL. But without haldeamon running, K3B does not work.

This should be fixed, soon!
Comment 3 Richard Homonnai 2010-12-25 16:51:29 UTC
k3b is now the last package depending on my system depending on HAL.
Please fix it :)
Comment 4 Marian Kyral 2010-12-25 21:13:16 UTC
The last change of sys-apps/hal package on Gentoo testing causes that K3b is not able to find the optical drive. K3b is the latest package depending on HAL on my system as well. I tested the latest git revision (6868839e).
Comment 5 Michał Małek 2010-12-26 17:16:58 UTC
commit 61639d6f00f57e2c980bd983907c490f6f67ff83
branch 2.0
Author: Michal Malek <michalm@jabster.pl>
Date:   Sun Dec 26 17:13:54 2010 +0100

    Added K3B_ENABLE_HAL_SUPPORT option to the build configuration. When enabled, K3b prevents HAL from polling the burning device during burning.
    BUG: 253388

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c915717..652be6c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,14 +19,15 @@ set(K3B_LIB_VERSION_RELEASE 0)
 
 
 ##################  K3b options #################################
-if (NOT WIN32)
-    option(K3B_BUILD_K3BSETUP "Build k3bsetup" ON)
-endif(NOT WIN32)
 option(K3B_DEBUG "K3b additional debugging support")
 option(K3B_ENABLE_MUSICBRAINZ "Support for querying metadata about audio tracks from Musicbrainz." ON)
 option(K3B_ENABLE_DVD_RIPPING "Support for ripping Video DVDs with optional decryption." ON)
 option(K3B_ENABLE_TAGLIB "Support for reading audio file metadata using Taglib." ON)
 option(K3B_BUILD_API_DOCS "Build the API documentation for the K3b libs." OFF)
+if(NOT WIN32 AND NOT APPLE)
+  option(K3B_BUILD_K3BSETUP "Graphical utility for managing device permissions" ON)
+  option(K3B_ENABLE_HAL_SUPPORT "Support for inhibiting HAL from polling disk during write." ON)
+endif(NOT WIN32 AND NOT APPLE)
 
 # plugin options
 option(K3B_BUILD_FFMPEG_DECODER_PLUGIN "Build FFmpeg decoder plugin" ON)
@@ -224,9 +225,9 @@ if(K3B_BUILD_EXTERNAL_ENCODER_PLUGIN)
  set(BUILD_EXTERNAL_ENCODER_PLUGIN 1)
 endif(K3B_BUILD_EXTERNAL_ENCODER_PLUGIN)
 
-if(NOT WIN32 AND NOT APPLE)
+if(K3B_ENABLE_HAL_SUPPORT)
   set(ENABLE_HAL_SUPPORT 1)
-endif(NOT WIN32 AND NOT APPLE)
+endif(K3B_ENABLE_HAL_SUPPORT)
 
 configure_file (config-k3b.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-k3b.h )
 
diff --git a/ChangeLog b/ChangeLog
index 0d92c68..4123265 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2.0.2
 =====
+Changes:
+ * Added K3B_ENABLE_HAL_SUPPORT option to the build configuration. It allows to disable any direct calls to HAL (253388)
+
 Bugfixes:
  * Crash on start when checking device capabilities (246822)
  * Search paths on "Programs" options are not saved (248648)
Comment 6 Michał Małek 2010-12-26 17:16:59 UTC
commit d310459c9f1358393df7722c7b7a0d0af80cea11
branch master
Author: Michal Malek <michalm@jabster.pl>
Date:   Sun Dec 26 17:13:54 2010 +0100

    Added K3B_ENABLE_HAL_SUPPORT option to the build configuration. When enabled, K3b prevents HAL from polling the burning device during burning.
    BUG: 253388

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8151938..2239514 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,14 +19,15 @@ set(K3B_LIB_VERSION_RELEASE 0)
 
 
 ##################  K3b options #################################
-if (NOT WIN32)
-    option(K3B_BUILD_K3BSETUP "Build k3bsetup" ON)
-endif(NOT WIN32)
 option(K3B_DEBUG "K3b additional debugging support")
 option(K3B_ENABLE_MUSICBRAINZ "Support for querying metadata about audio tracks from Musicbrainz." ON)
 option(K3B_ENABLE_DVD_RIPPING "Support for ripping Video DVDs with optional decryption." ON)
 option(K3B_ENABLE_TAGLIB "Support for reading audio file metadata using Taglib." ON)
 option(K3B_BUILD_API_DOCS "Build the API documentation for the K3b libs." OFF)
+if(NOT WIN32 AND NOT APPLE)
+  option(K3B_BUILD_K3BSETUP "Graphical utility for managing device permissions" ON)
+  option(K3B_ENABLE_HAL_SUPPORT "Support for inhibiting HAL from polling disk during write." ON)
+endif(NOT WIN32 AND NOT APPLE)
 
 # plugin options
 option(K3B_BUILD_FFMPEG_DECODER_PLUGIN "Build FFmpeg decoder plugin" ON)
@@ -221,9 +222,9 @@ if(K3B_BUILD_EXTERNAL_ENCODER_PLUGIN)
  set(BUILD_EXTERNAL_ENCODER_PLUGIN 1)
 endif(K3B_BUILD_EXTERNAL_ENCODER_PLUGIN)
 
-if(NOT WIN32 AND NOT APPLE)
+if(K3B_ENABLE_HAL_SUPPORT)
   set(ENABLE_HAL_SUPPORT 1)
-endif(NOT WIN32 AND NOT APPLE)
+endif(K3B_ENABLE_HAL_SUPPORT)
 
 configure_file (config-k3b.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-k3b.h )
 
diff --git a/ChangeLog b/ChangeLog
index de69f3b..1e9e9be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,9 @@ Bugfixes:
 
 2.0.2
 =====
+Changes:
+ * Added K3B_ENABLE_HAL_SUPPORT option to the build configuration. It allows to disable any direct calls to HAL (253388)
+
 Bugfixes:
  * Crash on start when checking device capabilities (246822)
  * Search paths on "Programs" options are not saved (248648)
Comment 7 Michał Małek 2010-12-26 17:28:17 UTC
I have added K3B_ENABLE_HAL_SUPPORT which allows to disable any direct calls to HAL.

K3B from version 1.6.x depends only on Solid for device detection. It makes a direct call to HAL just to prevent it from polling medium during burning. It's not a hard dependency, though.
Bottom line: as long as Solid has a working udev-based backend K3b should work just fine (even if K3B_ENABLE_HAL_SUPPORT is set to ON).
Comment 8 Henry Pfeil 2011-03-16 17:54:04 UTC
Compiled k3b v2.02 with -DK3B_ENABLE_HAL_SUPPORT=no added to the cmake options in k3b.SlackBuild.
Can't find DVD hardware. K3bconfig won't authorize root to make changes.

Startup messages:
=-=-=-=-
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(Solid::DeviceInterface::Type)  error:  "org.freedesktop.DBus.Error.ServiceUnknown"

KAuth::BackendsManager::init: WARNING: KAuth was compiled with a working backend, but was unable to load it! Check your installation!
=-=-=-=-
During 'make' noticed lots of deprecated warnings regarding Listview. Might need to hunt down the QT-3 code and upgrade to QT-4 someday (wishlist).

Linux 2.6.37.4 #1 SMP Tue Mar 15 00:47:18 CDT 2011 x86_64 Dual Core AMD Opteron(tm) Processor 285 AuthenticAMD GNU/Linux

`chmod -x /etc/rc.d/rc.hald` weeks ago.