[Pkg-utopia-commits] r1048 - in packages/unstable/hal/debian: .
patches
Sjoerd Simons
sjoerd at costa.debian.org
Mon Oct 2 17:00:01 UTC 2006
Author: sjoerd
Date: 2006-10-02 17:00:01 +0000 (Mon, 02 Oct 2006)
New Revision: 1048
Added:
packages/unstable/hal/debian/patches/10_callout_errors.patch
packages/unstable/hal/debian/patches/11_no_useless_runner_errors.patch
Modified:
packages/unstable/hal/debian/changelog
Log:
* debian/patches/10_callout_errors.patch
- Added. Use dbus_error_free instead of LIBHAL_FREE_DBUS_ERROR. Ensures
errors correctly reach hald-runner.
* debian/patches/11_no_useless_runner_errors.patch
- Added. Only let hald-runner output warnings if there was actually an
error.
Modified: packages/unstable/hal/debian/changelog
===================================================================
--- packages/unstable/hal/debian/changelog 2006-09-30 02:54:46 UTC (rev 1047)
+++ packages/unstable/hal/debian/changelog 2006-10-02 17:00:01 UTC (rev 1048)
@@ -59,8 +59,14 @@
* debian/patches/09_check_hashtable_initialisation.patch
- Added. Check if the udi to method queue hashtable is initialized before
using it. (From upstream)
+ * debian/patches/10_callout_errors.patch
+ - Added. Use dbus_error_free instead of LIBHAL_FREE_DBUS_ERROR. Ensures
+ errors correctly reach hald-runner.
+ * debian/patches/11_no_useless_runner_errors.patch
+ - Added. Only let hald-runner output warnings if there was actually an
+ error.
- -- Sjoerd Simons <sjoerd at debian.org> Wed, 27 Sep 2006 23:09:39 +0200
+ -- Sjoerd Simons <sjoerd at debian.org> Mon, 2 Oct 2006 18:55:05 +0200
hal (0.5.7.1-2) unstable; urgency=low
Added: packages/unstable/hal/debian/patches/10_callout_errors.patch
===================================================================
--- packages/unstable/hal/debian/patches/10_callout_errors.patch (rev 0)
+++ packages/unstable/hal/debian/patches/10_callout_errors.patch 2006-10-02 17:00:01 UTC (rev 1048)
@@ -0,0 +1,131 @@
+commit 7ca14a9265548dc74cc6b16517d8d3f23e6d4c6c
+Author: Sjoerd Simons <sjoerd at luon.net>
+Date: Mon Oct 2 18:26:18 2006 +0200
+
+ use dbus_error_free instead of LIBHAL_FREE_DBUS_ERROR so errors are correctly
+ reported to hald-runner
+
+ Various tools use LIBHAL_FREE_DBUS_ERROR, which will print an error to stderror
+ when the error is not set. Because the runner uses stderror to get the errors
+ from the callout, this confuses it somewhat. Using dbus_error_free instead of
+ LIBHAL_FREE_DBUS_ERROR solves this.
+
+diff --git a/tools/hal-storage-closetray.c b/tools/hal-storage-closetray.c
+index 755ccd1..2866afd 100644
+--- a/tools/hal-storage-closetray.c
++++ b/tools/hal-storage-closetray.c
+@@ -107,7 +107,7 @@ #endif
+ dbus_error_init (&error);
+ if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
+ printf ("Cannot connect to hald\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+
+@@ -115,7 +115,7 @@ #endif
+ system_bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (system_bus == NULL) {
+ printf ("Cannot connect to the system bus\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+ #ifdef HAVE_POLKIT
+diff --git a/tools/hal-storage-eject.c b/tools/hal-storage-eject.c
+index 65248f3..3234be4 100644
+--- a/tools/hal-storage-eject.c
++++ b/tools/hal-storage-eject.c
+@@ -109,7 +109,7 @@ #endif
+ dbus_error_init (&error);
+ if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
+ printf ("Cannot connect to hald\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+
+@@ -117,7 +117,7 @@ #endif
+ system_bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (system_bus == NULL) {
+ printf ("Cannot connect to the system bus\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+ #ifdef HAVE_POLKIT
+diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
+index ef8d1a9..9c1348d 100644
+--- a/tools/hal-storage-mount.c
++++ b/tools/hal-storage-mount.c
+@@ -272,7 +272,7 @@ volume_findby (LibHalContext *hal_ctx, c
+ dbus_error_init (&error);
+ if ((hal_udis = libhal_manager_find_device_string_match (hal_ctx, property,
+ value, &num_hal_udis, &error)) == NULL) {
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ goto out;
+ }
+ for (i = 0; i < num_hal_udis; i++) {
+@@ -493,7 +493,7 @@ #endif
+ dbus_error_init (&error);
+ if (libhal_device_get_property_bool (hal_ctx, udi, "volume.ignore", &error) ||
+ dbus_error_is_set (&error)) {
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ permission_denied_volume_ignore (device);
+ }
+
+@@ -1011,7 +1011,7 @@ #endif
+ dbus_error_init (&error);
+ if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
+ printf ("Cannot connect to hald\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+
+@@ -1019,7 +1019,7 @@ #endif
+ system_bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (system_bus == NULL) {
+ printf ("Cannot connect to the system bus\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+ #ifdef HAVE_POLKIT
+diff --git a/tools/hal-storage-shared.c b/tools/hal-storage-shared.c
+index 0b95a35..f6e0bf2 100644
+--- a/tools/hal-storage-shared.c
++++ b/tools/hal-storage-shared.c
+@@ -288,7 +288,7 @@ #endif
+ dbus_error_init (&error);
+ if (libhal_device_get_property_bool (hal_ctx, udi, "volume.ignore", &error) ||
+ dbus_error_is_set (&error)) {
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ permission_denied_volume_ignore (device);
+ }
+
+diff --git a/tools/hal-storage-unmount.c b/tools/hal-storage-unmount.c
+index d1239f7..ef7cee9 100644
+--- a/tools/hal-storage-unmount.c
++++ b/tools/hal-storage-unmount.c
+@@ -112,7 +112,7 @@ #endif
+ dbus_error_init (&error);
+ if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
+ printf ("Cannot connect to hald\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+
+@@ -120,7 +120,7 @@ #endif
+ system_bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
+ if (system_bus == NULL) {
+ printf ("Cannot connect to the system bus\n");
+- LIBHAL_FREE_DBUS_ERROR (&error);
++ dbus_error_free (&error);
+ usage ();
+ }
+ #ifdef HAVE_POLKIT
Added: packages/unstable/hal/debian/patches/11_no_useless_runner_errors.patch
===================================================================
--- packages/unstable/hal/debian/patches/11_no_useless_runner_errors.patch (rev 0)
+++ packages/unstable/hal/debian/patches/11_no_useless_runner_errors.patch 2006-10-02 17:00:01 UTC (rev 1048)
@@ -0,0 +1,25 @@
+commit c4c0829e6164d35e651529dea81ccead2c9d999e
+Author: Sjoerd Simons <sjoerd at luon.net>
+Date: Mon Oct 2 17:34:00 2006 +0200
+
+ prevent hald-runner from printing unnecessary warning messages
+
+ Remove a trailing ; after an if. Caused warning message about not being able to
+ write to the started program's stdin to be printed even though there were no
+ errors.
+
+diff --git a/hald-runner/runner.c b/hald-runner/runner.c
+index 3fb1fb2..57a2a80 100644
+--- a/hald-runner/runner.c
++++ b/hald-runner/runner.c
+@@ -274,8 +274,8 @@ run_request_run (run_request *r, DBusCon
+ g_free (program_dir);
+
+ if (r->input) {
+- if (write(stdin_v, r->input, strlen(r->input)) != (ssize_t) strlen(r->input));
+- printf("Warning: Error while wite r->input (%s) to stdin_v.\n", r->input);
++ if (write(stdin_v, r->input, strlen(r->input)) != (ssize_t) strlen(r->input))
++ printf("Warning: Error while writing r->input (%s) to stdin_v.\n", r->input);
+ close(stdin_v);
+ }
+
More information about the Pkg-utopia-commits
mailing list