diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2007-04-13 01:26:05 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2007-04-13 01:26:05 +0000 |
commit | 04f6e68acd978cdb9ba555a99673c6c579704b8b (patch) | |
tree | 9d41d60a0a7bcdcb3275b946bb46e912841c8887 /sys-apps/hal | |
parent | Version bump (diff) | |
download | gentoo-2-04f6e68acd978cdb9ba555a99673c6c579704b8b.tar.gz gentoo-2-04f6e68acd978cdb9ba555a99673c6c579704b8b.tar.bz2 gentoo-2-04f6e68acd978cdb9ba555a99673c6c579704b8b.zip |
upstream fixes for hal addon keyboard
(Portage version: 2.1.2.3)
Diffstat (limited to 'sys-apps/hal')
-rw-r--r-- | sys-apps/hal/ChangeLog | 7 | ||||
-rw-r--r-- | sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch | 86 | ||||
-rw-r--r-- | sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch | 34 | ||||
-rw-r--r-- | sys-apps/hal/files/0.5.9/series | 2 |
4 files changed, 128 insertions, 1 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog index 4ab1cc059e65..c5407fdba710 100644 --- a/sys-apps/hal/ChangeLog +++ b/sys-apps/hal/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/hal # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.163 2007/04/12 16:43:50 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.164 2007/04/13 01:26:05 cardoe Exp $ + + 13 Apr 2007; Doug Goldstein <cardoe@gentoo.org> + +files/0.5.9/08_contains_not_fdi_directive.patch, + +files/0.5.9/09_hald_addon_keyboard_start_one.patch, files/0.5.9/series: + upstream fixes for hal addon keyboard 12 Apr 2007; Doug Goldstein <cardoe@gentoo.org> hal-0.5.9.ebuild: haldaemon groups tweak for FreeBSD diff --git a/sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch b/sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch new file mode 100644 index 000000000000..573418f5eed2 --- /dev/null +++ b/sys-apps/hal/files/0.5.9/08_contains_not_fdi_directive.patch @@ -0,0 +1,86 @@ +From: Danny Kukawka <danny.kukawka@web.de> +Date: Thu, 12 Apr 2007 19:39:06 +0000 (-0400) +Subject: fix contains_not fdi-directive +X-Git-Tag: HAL_0_2 +X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=485f9aa6780690d915a13d813bc753501a3c899e + +fix contains_not fdi-directive + +This patch fixes the contains_not FDI file directive/rule to return true (let +the match not fail) if the property is not set on the device. This allow to +have this rule: + + <match key="info.addons" contains_not="hald-addon-input"> + <append key="info.addons" type="strlist">hald-addon-input</append> + </match> + +Without this patch this fails if info.addons is not already set. With the +change it would match if: +* info.addons is not available +or +* info.addons contains no string 'hald-addon-input' +--- + +--- a/doc/spec/hal-spec-fdi-files.xml ++++ b/doc/spec/hal-spec-fdi-files.xml +@@ -156,10 +156,10 @@ + <para> + <literal>contains_not</literal> - can only be used with strlist (string list) + and string properties. +- For a string list this match if the given string is not match any of the +- item of the list for a string this match of the property not contains the +- (sub-)string. You can use this attribute to construct if/else blocks together +- with e.g. <literal>contains</literal>. ++ For a string list this match if the given string not match any of the ++ item of the list (or the property is not set for the device). For a string ++ this match of the property not contains the (sub-)string. You can use this ++ attribute to construct if/else blocks together with e.g. <literal>contains</literal>. + </para> + </listitem> + <listitem> +--- a/hald/device_info.c ++++ b/hald/device_info.c +@@ -447,27 +447,28 @@ handle_match (struct rule *rule, HalDevi + { + dbus_bool_t contains = FALSE; + +- if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRING) { +- if (hal_device_has_property (d, prop_to_check)) { ++ if (hal_device_has_property (d, prop_to_check) && value != NULL) { ++ ++ if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRING) { + const char *haystack; + + haystack = hal_device_property_get_string (d, prop_to_check); +- if (value != NULL && haystack != NULL && (strstr(haystack, value) != NULL)) +- contains = TRUE; +- } +- } else if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRLIST && value != NULL) { +- HalDeviceStrListIter iter; +- for (hal_device_property_strlist_iter_init (d, prop_to_check, &iter); +- hal_device_property_strlist_iter_is_valid (&iter); +- hal_device_property_strlist_iter_next (&iter)) { +- const char *str = hal_device_property_strlist_iter_get_value (&iter); +- if (strcmp (str, value) == 0) { ++ if (haystack != NULL && (strstr(haystack, value) != NULL)) + contains = TRUE; +- break; ++ } else if (hal_device_property_get_type (d, prop_to_check) == HAL_PROPERTY_TYPE_STRLIST) { ++ HalDeviceStrListIter iter; ++ for (hal_device_property_strlist_iter_init (d, prop_to_check, &iter); ++ hal_device_property_strlist_iter_is_valid (&iter); ++ hal_device_property_strlist_iter_next (&iter)) { ++ const char *str = hal_device_property_strlist_iter_get_value (&iter); ++ if (strcmp (str, value) == 0) { ++ contains = TRUE; ++ break; ++ } + } ++ } else { ++ return FALSE; + } +- } else { +- return FALSE; + } + + if (rule->type_match == MATCH_CONTAINS) { diff --git a/sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch b/sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch new file mode 100644 index 000000000000..d5318aa3fb1f --- /dev/null +++ b/sys-apps/hal/files/0.5.9/09_hald_addon_keyboard_start_one.patch @@ -0,0 +1,34 @@ +From: David Zeuthen <davidz@redhat.com> +Date: Thu, 12 Apr 2007 19:46:26 +0000 (-0400) +Subject: only start one hald-addon-keyboard addon +X-Git-Tag: HAL_0_2 +X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=f22a37b7a7073b3398e9060e21bc1d12dc58783f + +only start one hald-addon-keyboard addon + +this patch fixes the problem that one device can have get started the +same hald-addon-keyboard addon multiple times. This work only together +with my patch for the contains_not FDI-file directive. + +(similar to commit 5745da44f3bb43dafd9b53cbfcfc1218619a5263 on master) +--- + +--- a/fdi/policy/10osvendor/10-keyboard-policy.fdi ++++ b/fdi/policy/10osvendor/10-keyboard-policy.fdi +@@ -5,10 +5,14 @@ + <device> + <match key="info.capabilities" contains="input"> + <match key="info.capabilities" contains="button"> +- <append key="info.addons" type="strlist">hald-addon-keyboard</append> ++ <match key="info.addons" contains_not="hald-addon-keyboard"> ++ <append key="info.addons" type="strlist">hald-addon-keyboard</append> ++ </match> + </match> + <match key="info.capabilities" contains="input.keyboard"> +- <append key="info.addons" type="strlist">hald-addon-keyboard</append> ++ <match key="info.addons" contains_not="hald-addon-keyboard"> ++ <append key="info.addons" type="strlist">hald-addon-keyboard</append> ++ </match> + <match key="info.capabilities" contains_not="button"> + <append key="info.capabilities" type="strlist">button</append> + </match> diff --git a/sys-apps/hal/files/0.5.9/series b/sys-apps/hal/files/0.5.9/series index 7713b7cc8133..4193623fd732 100644 --- a/sys-apps/hal/files/0.5.9/series +++ b/sys-apps/hal/files/0.5.9/series @@ -5,5 +5,7 @@ 05_freebsd_partutil_make_fix.patch 06_freebsd_backend_fix.patch 07_malloc_h_for_stdlib_h.patch +08_contains_not_fdi_directive.patch +09_hald_addon_keyboard_start_one.patch 95_gentoo_man_page.patch 96_plugdev_allow_send.patch |