From 1b847a21fac05e88510fe37db63d0d9e4b72e633 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 27 Mar 2018 11:05:46 +0200 Subject: dbus-cynara: Avoid dependency loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dependency loop appeared when compiling with DISTRO_FEATURE ptest. To avoid it, I restore the logic implemented before in meta-intel-iot-security. I also remove unless files. Bug-AGL: SPEC-1334 Change-Id: Ibe8b9359a65fec034df2534c5fceb4769e63aa99 Signed-off-by: José Bollo --- ...lper-for-using-byte-arrays-as-the-variant.patch | 97 ---------------------- 1 file changed, 97 deletions(-) delete mode 100644 meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-New-a-sv-helper-for-using-byte-arrays-as-the-variant.patch (limited to 'meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-New-a-sv-helper-for-using-byte-arrays-as-the-variant.patch') diff --git a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-New-a-sv-helper-for-using-byte-arrays-as-the-variant.patch b/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-New-a-sv-helper-for-using-byte-arrays-as-the-variant.patch deleted file mode 100644 index 64c8b9b50..000000000 --- a/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-New-a-sv-helper-for-using-byte-arrays-as-the-variant.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 25cb15916402c55112cae2be0954d24afe74e2f2 Mon Sep 17 00:00:00 2001 -From: Tyler Hicks -Date: Thu, 13 Mar 2014 17:37:38 -0500 -Subject: [PATCH 2/8] New a{sv} helper for using byte arrays as the variant - -Create a new helper for using a byte array as the value in the mapping -from string to variant. - -Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113 -Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89041 -Signed-off-by: Tyler Hicks -Reviewed-by: Simon McVittie -Reviewed-by: Philip Withnall ---- - dbus/dbus-asv-util.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - dbus/dbus-asv-util.h | 4 ++++ - 2 files changed, 58 insertions(+) - -diff --git a/dbus/dbus-asv-util.c b/dbus/dbus-asv-util.c -index 583e41f..d3ac5e9 100644 ---- a/dbus/dbus-asv-util.c -+++ b/dbus/dbus-asv-util.c -@@ -258,3 +258,57 @@ _dbus_asv_add_string (DBusMessageIter *arr_iter, - - return TRUE; - } -+ -+/** -+ * Create a new entry in an a{sv} (map from string to variant) -+ * with a byte array value. -+ * -+ * If this function fails, the a{sv} must be abandoned, for instance -+ * with _dbus_asv_abandon(). -+ * -+ * @param arr_iter the iterator which is appending to the array -+ * @param key a UTF-8 key for the map -+ * @param value the value -+ * @param n_elements the number of elements to append -+ * @returns #TRUE on success, or #FALSE if not enough memory -+ */ -+dbus_bool_t -+_dbus_asv_add_byte_array (DBusMessageIter *arr_iter, -+ const char *key, -+ const void *value, -+ int n_elements) -+{ -+ DBusMessageIter entry_iter; -+ DBusMessageIter var_iter; -+ DBusMessageIter byte_array_iter; -+ -+ if (!_dbus_asv_open_entry (arr_iter, &entry_iter, key, "ay", &var_iter)) -+ return FALSE; -+ -+ if (!dbus_message_iter_open_container (&var_iter, DBUS_TYPE_ARRAY, -+ DBUS_TYPE_BYTE_AS_STRING, -+ &byte_array_iter)) -+ { -+ _dbus_asv_abandon_entry (arr_iter, &entry_iter, &var_iter); -+ return FALSE; -+ } -+ -+ if (!dbus_message_iter_append_fixed_array (&byte_array_iter, DBUS_TYPE_BYTE, -+ &value, n_elements)) -+ { -+ dbus_message_iter_abandon_container (&var_iter, &byte_array_iter); -+ _dbus_asv_abandon_entry (arr_iter, &entry_iter, &var_iter); -+ return FALSE; -+ } -+ -+ if (!dbus_message_iter_close_container (&var_iter, &byte_array_iter)) -+ { -+ _dbus_asv_abandon_entry (arr_iter, &entry_iter, &var_iter); -+ return FALSE; -+ } -+ -+ if (!_dbus_asv_close_entry (arr_iter, &entry_iter, &var_iter)) -+ return FALSE; -+ -+ return TRUE; -+} -diff --git a/dbus/dbus-asv-util.h b/dbus/dbus-asv-util.h -index 0337260..277ab80 100644 ---- a/dbus/dbus-asv-util.h -+++ b/dbus/dbus-asv-util.h -@@ -42,5 +42,9 @@ dbus_bool_t _dbus_asv_add_uint32 (DBusMessageIter *arr_iter, - dbus_bool_t _dbus_asv_add_string (DBusMessageIter *arr_iter, - const char *key, - const char *value); -+dbus_bool_t _dbus_asv_add_byte_array (DBusMessageIter *arr_iter, -+ const char *key, -+ const void *value, -+ int n_elements); - - #endif --- -2.1.4 - -- cgit 1.2.3-korg