From a9e564a948891b6a8bc2477d8d5d26ef914478a5bc52f7d3ccafb1aa4971b02b Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 20 Nov 2008 14:20:09 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/evolution-data-server?expand=0&rev=48 --- bnc-210959-eds-accept_ics.patch | 432 ++++++++++++++++++++++ bnc-431133-unread-mail-empty.patch | 11 + bnc-435599-junk-contacts-created.patch | 55 +++ bnc-438730-loosing-more-state.patch | 36 ++ bnc-441347-imap-performance-fix.patch | 90 +++++ bnc-441542-fix-translock.patch | 32 ++ bnc-446269-moving-emails-broken.patch | 20 + bnc-446371-fix-completed-on.patch | 26 ++ bnc-446372-fix-empty-trash.patch | 11 + bnc-446373-fix-refresh-vfolderquery.patch | 57 +++ evolution-data-server.changes | 25 ++ evolution-data-server.spec | 58 ++- 12 files changed, 850 insertions(+), 3 deletions(-) create mode 100644 bnc-210959-eds-accept_ics.patch create mode 100644 bnc-431133-unread-mail-empty.patch create mode 100644 bnc-435599-junk-contacts-created.patch create mode 100644 bnc-438730-loosing-more-state.patch create mode 100644 bnc-441347-imap-performance-fix.patch create mode 100644 bnc-441542-fix-translock.patch create mode 100644 bnc-446269-moving-emails-broken.patch create mode 100644 bnc-446371-fix-completed-on.patch create mode 100644 bnc-446372-fix-empty-trash.patch create mode 100644 bnc-446373-fix-refresh-vfolderquery.patch diff --git a/bnc-210959-eds-accept_ics.patch b/bnc-210959-eds-accept_ics.patch new file mode 100644 index 0000000..ae7d78f --- /dev/null +++ b/bnc-210959-eds-accept_ics.patch @@ -0,0 +1,432 @@ +Index: servers/groupwise/e-gw-connection.h +=================================================================== +--- servers/groupwise/e-gw-connection.h (revision 9156) ++++ servers/groupwise/e-gw-connection.h (working copy) +@@ -126,6 +126,7 @@ char *e_gw_connection_form + + + EGwConnectionStatus e_gw_connection_create_item (EGwConnection *cnc, EGwItem *item, char** id); ++EGwConnectionStatus e_gw_connection_create_items (EGwConnection *cnc, EGwItem *item, GSList **ids); + EGwConnectionStatus e_gw_connection_get_item (EGwConnection *cnc, const char *container, const char *id, const char *view, EGwItem **item); + EGwConnectionStatus e_gw_connection_modify_item (EGwConnection *cnc, const char *id, EGwItem *item); + EGwConnectionStatus e_gw_connection_accept_request (EGwConnection *cnc, const char *id, const char *accept_level, const char *accept_comment, const char *recurrence_key); +Index: servers/groupwise/e-gw-connection.c +=================================================================== +--- servers/groupwise/e-gw-connection.c (revision 9156) ++++ servers/groupwise/e-gw-connection.c (working copy) +@@ -1299,11 +1299,24 @@ e_gw_connection_send_item (EGwConnection + } + + EGwConnectionStatus +-e_gw_connection_create_item (EGwConnection *cnc, EGwItem *item, char** id) ++e_gw_connection_create_item (EGwConnection *cnc, EGwItem *item, char** id) ++{ ++ GSList *ids = NULL; ++ EGwConnectionStatus status; ++ ++ status = e_gw_connection_create_items (cnc, item, &ids); ++ ++ if (status == E_GW_CONNECTION_STATUS_OK) ++ *id = ids->data; ++ ++ return status; ++} ++ ++EGwConnectionStatus ++e_gw_connection_create_items (EGwConnection *cnc, EGwItem *item, GSList **id_list) + { + SoupSoapMessage *msg; + SoupSoapResponse *response; +- SoupSoapParameter *param; + EGwConnectionStatus status = E_GW_CONNECTION_STATUS_UNKNOWN; + + g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_CONNECTION); +@@ -1332,10 +1345,17 @@ e_gw_connection_create_item (EGwConnecti + } + + status = e_gw_connection_parse_response_status (response); +- if (status == E_GW_CONNECTION_STATUS_OK) { +- param = soup_soap_response_get_first_parameter_by_name (response, "id"); +- if (param != NULL) +- *id = soup_soap_parameter_get_string_value (param); ++ if (status == E_GW_CONNECTION_STATUS_OK && id_list) { ++ SoupSoapParameter *param; ++ ++ *id_list = NULL; ++ /* get the generated ID from the SOAP response */ ++ // for loop here to populate the list_ids. ++ for (param = soup_soap_response_get_first_parameter_by_name (response, "id"); ++ param; param = soup_soap_response_get_next_parameter_by_name (response, param, "id")) { ++ ++ *id_list = g_slist_append (*id_list, soup_soap_parameter_get_string_value (param)); ++ } + } else if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION) + reauthenticate (cnc); + +Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.c +=================================================================== +--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c (revision 9156) ++++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c (working copy) +@@ -1383,14 +1383,14 @@ e_gw_item_to_cal_component (EGwItem *ite + } + + EGwConnectionStatus +-e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *container, ECalComponent *comp, icalproperty_method method, gboolean all_instances, ECalComponent **created_comp, icalparameter_partstat *pstatus) ++e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *c_gw_id, ECalComponent *comp, icalproperty_method method, gboolean all_instances, ECalComponent **created_comp, icalparameter_partstat *pstatus, gboolean *is_import) + { + EGwConnection *cnc; + EGwConnectionStatus status; + icalparameter_partstat partstat; + char *item_id = NULL; + const char *gw_id; +- const char *recurrence_key = NULL; ++ const char *recurrence_key = NULL, *container; + gboolean need_to_get = FALSE, decline = FALSE; + ECalComponentVType type; + +@@ -1400,25 +1400,29 @@ e_gw_connection_send_appointment (ECalBa + + e_cal_component_commit_sequence (comp); + type = e_cal_component_get_vtype (comp); ++ container = e_cal_backend_groupwise_get_container_id (cbgw); + + gw_id = e_cal_component_get_gw_id (comp); + +- switch (type) { ++ if (gw_id) { ++ switch (type) { + +- case E_CAL_COMPONENT_EVENT: +- case E_CAL_COMPONENT_TODO: +- case E_CAL_COMPONENT_JOURNAL: +- if (!g_str_has_suffix (gw_id, container)) { +- item_id = g_strconcat (e_cal_component_get_gw_id (comp), GW_EVENT_TYPE_ID, container, NULL); +- need_to_get = TRUE; ++ case E_CAL_COMPONENT_EVENT: ++ case E_CAL_COMPONENT_TODO: ++ case E_CAL_COMPONENT_JOURNAL: ++ if (!g_str_has_suffix (gw_id, container)) { ++ item_id = g_strconcat (e_cal_component_get_gw_id (comp), GW_EVENT_TYPE_ID, container, NULL); ++ need_to_get = TRUE; + +- } +- else +- item_id = g_strdup (gw_id); +- break; +- default: +- return E_GW_CONNECTION_STATUS_INVALID_OBJECT; +- } ++ } ++ else ++ item_id = g_strdup (gw_id); ++ break; ++ default: ++ return E_GW_CONNECTION_STATUS_INVALID_OBJECT; ++ } ++ } else if (c_gw_id) ++ item_id = g_strdup (c_gw_id); + + if (all_instances) + e_cal_component_get_uid (comp, &recurrence_key); +@@ -1491,6 +1495,13 @@ e_gw_connection_send_appointment (ECalBa + break; + } + *pstatus = partstat; ++ ++ /* The item is not in the calendar, so we need to import the item */ ++ if (!item_id) { ++ *is_import = TRUE; ++ return E_GW_CONNECTION_STATUS_OK; ++ } ++ + switch (partstat) { + ECalComponentTransparency transp; + +@@ -1549,41 +1560,20 @@ e_gw_connection_send_appointment (ECalBa + } + + EGwConnectionStatus +-e_gw_connection_create_appointment (EGwConnection *cnc, const char *container, ECalBackendGroupwise *cbgw, ECalComponent *comp, GSList **id_list) ++e_gw_connection_create_appointment (EGwConnection *cnc, const char *container, ECalBackendGroupwise *cbgw, ECalComponent *comp, GSList **id_list, gboolean personal) + { + EGwItem *item; + EGwConnectionStatus status; +- icalproperty *icalprop; +- gboolean move_cal = FALSE; +- icalcomponent *icalcomp; +- char *id = NULL; + + g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_CONNECTION); + g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), E_GW_CONNECTION_STATUS_INVALID_OBJECT); + +- icalcomp = e_cal_component_get_icalcomponent (comp); +- +- icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); +- while (icalprop) { +- const char *x_name; +- +- x_name = icalproperty_get_x_name (icalprop); +- if (!strcmp (x_name, "X-EVOLUTION-MOVE-CALENDAR")) { +- move_cal = TRUE; +- break; +- } +- +- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY); +- } +- + item = e_gw_item_new_from_cal_component (container, cbgw, comp); + e_gw_item_set_container_id (item, container); +- if (!move_cal) ++ if (!personal) + status = e_gw_connection_send_item (cnc, item, id_list); + else { +- e_gw_item_set_source (item, "personal"); +- status = e_gw_connection_create_item (cnc, item, &id); +- *id_list = g_slist_append (*id_list, id); ++ status = e_gw_connection_create_items (cnc, item, id_list); + } + g_object_unref (item); + +Index: calendar/backends/groupwise/e-cal-backend-groupwise.c +=================================================================== +--- calendar/backends/groupwise/e-cal-backend-groupwise.c (revision 9156) ++++ calendar/backends/groupwise/e-cal-backend-groupwise.c (working copy) +@@ -130,6 +130,15 @@ e_cal_backend_groupwise_get_categories_b + return cbgw->priv->categories_by_id; + } + ++const char * ++e_cal_backend_groupwise_get_container_id (ECalBackendGroupwise *cbgw) ++{ ++ ++ g_return_val_if_fail (E_IS_CAL_BACKEND_GROUPWISE (cbgw), NULL); ++ ++ return cbgw->priv->container_id; ++} ++ + GHashTable * + e_cal_backend_groupwise_get_categories_by_name (ECalBackendGroupwise *cbgw) { + +@@ -1932,6 +1941,31 @@ sanitize_component (ECalBackendSync *bac + g_string_free (str, TRUE); + } + ++ ++static gboolean ++check_for_move (ECalComponent *comp) ++{ ++ gboolean personal = FALSE; ++ icalcomponent *icalcomp; ++ icalproperty *icalprop; ++ ++ icalcomp = e_cal_component_get_icalcomponent (comp); ++ icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); ++ ++ while (icalprop) { ++ const char *x_name; ++ ++ x_name = icalproperty_get_x_name (icalprop); ++ if (!strcmp (x_name, "X-EVOLUTION-MOVE-CALENDAR")) { ++ personal = TRUE; ++ break; ++ } ++ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY); ++ } ++ ++ return personal; ++} ++ + static ECalBackendSyncStatus + e_cal_backend_groupwise_create_object (ECalBackendSync *backend, EDataCal *cal, char **calobj, char **uid) + { +@@ -1942,6 +1976,7 @@ e_cal_backend_groupwise_create_object (E + EGwConnectionStatus status; + char *server_uid = NULL; + GSList *uid_list = NULL, *l; ++ gboolean personal = FALSE; + int i; + + cbgw = E_CAL_BACKEND_GROUPWISE (backend); +@@ -1972,11 +2007,13 @@ e_cal_backend_groupwise_create_object (E + switch (priv->mode) { + case CAL_MODE_ANY : + case CAL_MODE_REMOTE : ++ personal = check_for_move (comp); ++ + /* when online, send the item to the server */ +- status = e_gw_connection_create_appointment (priv->cnc, priv->container_id, cbgw, comp, &uid_list); ++ status = e_gw_connection_create_appointment (priv->cnc, priv->container_id, cbgw, comp, &uid_list, personal); + + if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION) +- status = e_gw_connection_create_appointment (priv->cnc, priv->container_id, cbgw, comp, &uid_list); ++ status = e_gw_connection_create_appointment (priv->cnc, priv->container_id, cbgw, comp, &uid_list, personal); + + if (status != E_GW_CONNECTION_STATUS_OK) { + g_object_unref (comp); +@@ -2483,6 +2520,88 @@ change_status (ECalComponent *comp, ical + } + } + ++ ++static ECalBackendSyncStatus ++import_items (ECalBackendGroupwise *cbgw, ECalComponent *comp) ++{ ++ EGwConnectionStatus status; ++ ECalBackendGroupwisePrivate *priv; ++ GSList *uid_list = NULL; ++ gboolean personal = TRUE; ++ ++ priv = cbgw->priv; ++ ++ status = e_gw_connection_create_appointment (priv->cnc, priv->container_id, cbgw, comp, &uid_list, personal); ++ if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION) ++ status = e_gw_connection_create_appointment (priv->cnc, priv->container_id, cbgw, comp, &uid_list, personal); ++ ++ if (status != E_GW_CONNECTION_STATUS_OK) { ++ if (status == E_GW_CONNECTION_STATUS_UNKNOWN_USER) ++ return GNOME_Evolution_Calendar_UnknownUser; ++ else ++ return GNOME_Evolution_Calendar_OtherError; ++ } ++ ++ if (g_slist_length (uid_list) == 1) { ++ char *server_uid, *temp; ++ ++ server_uid = (char *) uid_list->data; ++ sanitize_component ((ECalBackendSync *) cbgw, comp, server_uid); ++ g_free (server_uid); ++ ++ /* if successful, update the cache */ ++ e_cal_backend_cache_put_component (priv->cache, comp); ++ ++ temp = e_cal_component_get_as_string (comp); ++ e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), temp); ++ g_free (temp); ++ } else { ++ EGwConnectionStatus stat; ++ GSList *l; ++ GList *list = NULL, *tmp; ++ GPtrArray *uid_array = g_ptr_array_new (); ++ guint i; ++ ++ for (l = uid_list; l; l = g_slist_next (l)) { ++ g_ptr_array_add (uid_array, l->data); ++ } ++ ++ /* convert uid_list to GPtrArray and get the items in a list */ ++ stat = e_gw_connection_get_items_from_ids (priv->cnc, ++ priv->container_id, ++ "attachments recipients message recipientStatus default peek", ++ uid_array, &list); ++ ++ if (stat != E_GW_CONNECTION_STATUS_OK || (list == NULL) || (g_list_length (list) == 0)) { ++ g_ptr_array_free (uid_array, TRUE); ++ return GNOME_Evolution_Calendar_OtherError; ++ } ++ ++ comp = g_object_ref ( (ECalComponent *) list->data ); ++ /* convert items into components and add them to the cache */ ++ for (i=0, tmp = list; tmp ; tmp = g_list_next (tmp), i++) { ++ ECalComponent *e_cal_comp; ++ EGwItem *item; ++ char *temp; ++ ++ item = (EGwItem *) tmp->data; ++ e_cal_comp = e_gw_item_to_cal_component (item, cbgw); ++ e_cal_component_commit_sequence (e_cal_comp); ++ sanitize_component ((ECalBackendSync *) cbgw, e_cal_comp, g_ptr_array_index (uid_array, i)); ++ e_cal_backend_cache_put_component (priv->cache, e_cal_comp); ++ ++ temp = e_cal_component_get_as_string (e_cal_comp); ++ e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), temp); ++ g_free (temp); ++ ++ g_object_unref (e_cal_comp); ++ } ++ g_ptr_array_free (uid_array, TRUE); ++ } ++ ++ return GNOME_Evolution_Calendar_Success; ++} ++ + static ECalBackendSyncStatus + receive_object (ECalBackendGroupwise *cbgw, EDataCal *cal, icalcomponent *icalcomp) + { +@@ -2493,6 +2612,9 @@ receive_object (ECalBackendGroupwise *cb + gboolean all_instances = FALSE; + icalparameter_partstat pstatus; + icalproperty *icalprop; ++ ECalComponent *cache_comp; ++ gboolean is_import = FALSE; ++ const char *uid, *c_gw_id = NULL; + + priv = cbgw->priv; + +@@ -2518,15 +2640,36 @@ receive_object (ECalBackendGroupwise *cb + comp = e_cal_component_new (); + e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp)); + method = icalcomponent_get_method (icalcomp); ++ e_cal_component_get_uid (comp, &uid); ++ ++ cache_comp = e_cal_backend_cache_get_component (priv->cache, uid, NULL); ++ if (cache_comp) ++ c_gw_id = e_cal_component_get_gw_id (cache_comp); + + /* handle attachments */ + if (e_cal_component_has_attachments (comp)) + fetch_attachments (cbgw, comp); + +- status = e_gw_connection_send_appointment (cbgw, priv->container_id, comp, method, all_instances, &modif_comp, &pstatus); ++ status = e_gw_connection_send_appointment (cbgw, c_gw_id, comp, method, all_instances, &modif_comp, &pstatus, &is_import); + + if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION) +- status = e_gw_connection_send_appointment (cbgw, priv->container_id, comp, method, all_instances, &modif_comp, &pstatus); ++ status = e_gw_connection_send_appointment (cbgw, c_gw_id, comp, method, all_instances, &modif_comp, &pstatus, &is_import); ++ ++ if (cache_comp) { ++ g_object_unref (cache_comp); ++ cache_comp = NULL; ++ c_gw_id = NULL; ++ } ++ ++ if (is_import) { ++ if (pstatus == ICAL_PARTSTAT_DECLINED) ++ return GNOME_Evolution_Calendar_ObjectNotFound; ++ ++ status = import_items (cbgw, comp); ++ g_object_unref (comp); ++ ++ return status; ++ } + + if (!modif_comp) + modif_comp = g_object_ref (comp); +Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.h +=================================================================== +--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.h (revision 9156) ++++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.h (working copy) +@@ -51,8 +51,10 @@ void e_gw_item_set_changes (EGw + /* + * Connection-related utility functions + */ +-EGwConnectionStatus e_gw_connection_create_appointment (EGwConnection *cnc, const char *container, ECalBackendGroupwise *cbgw, ECalComponent *comp, GSList **id_list); +-EGwConnectionStatus e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *container, ECalComponent *comp, icalproperty_method method, gboolean all_instances, ECalComponent **created_comp, icalparameter_partstat *pstatus); ++EGwConnectionStatus e_gw_connection_create_appointment (EGwConnection *cnc, const char *container, ECalBackendGroupwise *cbgw, ECalComponent *comp, GSList **id_list, gboolean personal); ++EGwConnectionStatus e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const char *c_gw_id, ECalComponent *comp, icalproperty_method method, gboolean all_instances, ECalComponent **created_comp, icalparameter_partstat *pstatus, gboolean *import); ++ EGwConnectionStatus e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t start, time_t end, GList **freebusy, icaltimezone *default_zone); ++ gboolean e_cal_backend_groupwise_store_settings (GwSettings *hold); + EGwConnectionStatus e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t start, time_t end, GList **freebusy, icaltimezone *default_zone); + gboolean e_cal_backend_groupwise_store_settings (GwSettings *hold); + EGwItem * e_gw_item_new_for_delegate_from_cal (ECalBackendGroupwise *cbgw, ECalComponent *comp); +Index: calendar/backends/groupwise/e-cal-backend-groupwise.h +=================================================================== +--- calendar/backends/groupwise/e-cal-backend-groupwise.h (revision 9156) ++++ calendar/backends/groupwise/e-cal-backend-groupwise.h (working copy) +@@ -63,6 +63,7 @@ GHashTable* e_cal_backend_groupwise_get_ + icaltimezone* e_cal_backend_groupwise_get_default_zone (ECalBackendGroupwise *cbgw); + void e_cal_backend_groupwise_notify_error_code (ECalBackendGroupwise *cbgw, EGwConnectionStatus status); + const char * e_cal_backend_groupwise_get_local_attachments_store (ECalBackendGroupwise *cbgw); ++const char * e_cal_backend_groupwise_get_container_id (ECalBackendGroupwise *cbgw); + G_END_DECLS + + #endif diff --git a/bnc-431133-unread-mail-empty.patch b/bnc-431133-unread-mail-empty.patch new file mode 100644 index 0000000..6650ea6 --- /dev/null +++ b/bnc-431133-unread-mail-empty.patch @@ -0,0 +1,11 @@ +--- camel/camel-vee-summary.c ++++ camel/camel-vee-summary.c +@@ -42,7 +42,7 @@ + #define d(x) + + static CamelFolderSummaryClass *camel_vee_summary_parent; +-const char *unread_str = " (and\n \n (match-all (not (system-flag \"Seen\")))\n \n )\n; (match-threads \"all\" (and\n \n (match-all (not (system-flag \"Seen\")))\n \n )\n)\n;"; ++const char *unread_str = " (and\n \n (match-all (not (system-flag \"Seen\")))\n \n )\n; (or\n \n (match-all (not (system-flag \"Seen\")))\n \n )\n; (match-threads \"all\" (and\n \n (match-all (not (system-flag \"Seen\")))\n \n )\n)\n; (match-threads \"all\" (or\n \n (match-all (not (system-flag \"Seen\")))\n \n )\n)\n;"; + + static void + vee_message_info_free(CamelFolderSummary *s, CamelMessageInfo *info) diff --git a/bnc-435599-junk-contacts-created.patch b/bnc-435599-junk-contacts-created.patch new file mode 100644 index 0000000..53ffe4b --- /dev/null +++ b/bnc-435599-junk-contacts-created.patch @@ -0,0 +1,55 @@ +Index: addressbook/backends/groupwise/e-book-backend-groupwise.c +=================================================================== +--- addressbook/backends/groupwise/e-book-backend-groupwise.c (revision 9761) ++++ addressbook/backends/groupwise/e-book-backend-groupwise.c (working copy) +@@ -1168,7 +1168,9 @@ + int element_type; + int i; + gboolean is_contact_list; ++ gboolean is_organization; + ++ is_organization = e_gw_item_get_item_type (item) == E_GW_ITEM_TYPE_ORGANISATION ? TRUE: FALSE; + is_contact_list = e_gw_item_get_item_type (item) == E_GW_ITEM_TYPE_GROUP ? TRUE: FALSE; + e_contact_set (contact, E_CONTACT_IS_LIST, GINT_TO_POINTER (is_contact_list)); + if (is_contact_list) +@@ -1179,9 +1181,11 @@ + + if(element_type == ELEMENT_TYPE_SIMPLE) { + if (mappings[i].field_id != E_CONTACT_BOOK_URI) { +- value = e_gw_item_get_field_value (item, mappings[i].element_name); +- if(value != NULL) +- e_contact_set (contact, mappings[i].field_id, value); ++ if (!is_organization) { ++ value = e_gw_item_get_field_value (item, mappings[i].element_name); ++ if(value != NULL) ++ e_contact_set (contact, mappings[i].field_id, value); ++ } + } + } else if (element_type == ELEMENT_TYPE_COMPLEX) { + if (mappings[i].field_id == E_CONTACT_CATEGORIES) { +@@ -1251,10 +1255,6 @@ + element_type = mappings[i].element_type; + if (element_type == ELEMENT_TYPE_SIMPLE) { + value = e_contact_get(contact, mappings[i].field_id); +- if (mappings[i].field_id == E_CONTACT_ORG) { +- set_organization_in_gw_item (item, contact, egwb); +- continue; +- } + if (value != NULL) + e_gw_item_set_field_value (item, mappings[i].element_name, value); + } else if (element_type == ELEMENT_TYPE_COMPLEX) { +@@ -1453,14 +1453,7 @@ + + if (e_contact_get (contact, E_CONTACT_IS_LIST)) + set_member_changes (new_item, old_item, egwb); +- new_org = e_gw_item_get_field_value (new_item, "organization"); +- old_org = e_gw_item_get_field_value (old_item, "organization"); +- if (new_org && *new_org) { + +- if ((old_org == NULL) || (old_org && strcmp (new_org, old_org)) != 0) +- set_organization_in_gw_item (new_item, contact, egwb); +- } +- + set_changes_in_gw_item (new_item, old_item); + + e_gw_item_set_item_type (new_item, e_gw_item_get_item_type (old_item)); diff --git a/bnc-438730-loosing-more-state.patch b/bnc-438730-loosing-more-state.patch new file mode 100644 index 0000000..6d40ec0 --- /dev/null +++ b/bnc-438730-loosing-more-state.patch @@ -0,0 +1,36 @@ +--- camel/camel-folder-summary.c ++++ camel/camel-folder-summary.c +@@ -67,6 +67,7 @@ + + /* Make 5 minutes as default cache drop */ + #define SUMMARY_CACHE_DROP 300 ++#define dd(x) if (camel_debug("sync")) x + + static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER; + +@@ -823,12 +824,13 @@ remove_cache (CamelSession *session, CamelSessionThreadMsg *msg) + CamelFolderSummary *s = m->summary; + + CAMEL_DB_RELEASE_SQLITE_MEMORY; +- ++ camel_folder_sync (s->folder, FALSE, NULL); ++ + if (time(NULL) - s->cache_load_time < SUMMARY_CACHE_DROP) + return; + +- d(printf("removing cache for %s %d %p\n", s->folder ? s->folder->full_name : s->summary_path, g_hash_table_size (s->loaded_infos), s->loaded_infos)); +- #warning "hack. fix it" ++ dd(printf("removing cache for %s %d %p\n", s->folder ? s->folder->full_name : s->summary_path, g_hash_table_size (s->loaded_infos), s->loaded_infos)); ++ + CAMEL_SUMMARY_LOCK (s, summary_lock); + g_hash_table_foreach_remove (s->loaded_infos, (GHRFunc) remove_item, s); + CAMEL_SUMMARY_UNLOCK (s, summary_lock); +@@ -1378,7 +1380,7 @@ camel_folder_summary_save_to_db (CamelFolderSummary *s, CamelException *ex) + if (!count) + return camel_folder_summary_header_save_to_db (s, ex); + +- d(printf("Saving %d/%d dirty records of %s\n", count, g_hash_table_size (s->loaded_infos), s->folder->full_name)); ++ dd(printf("Saving %d/%d dirty records of %s\n", count, g_hash_table_size (s->loaded_infos), s->folder->full_name)); + + camel_db_begin_transaction (cdb, ex); + diff --git a/bnc-441347-imap-performance-fix.patch b/bnc-441347-imap-performance-fix.patch new file mode 100644 index 0000000..b81bc6b --- /dev/null +++ b/bnc-441347-imap-performance-fix.patch @@ -0,0 +1,90 @@ +Index: camel/providers/imap/camel-imap-store.c +=================================================================== +--- camel/providers/imap/camel-imap-store.c (revision 9761) ++++ camel/providers/imap/camel-imap-store.c (working copy) +@@ -2385,7 +2385,7 @@ parse_list_response_as_folder_info (Came + if (si == NULL) + return NULL; + +- newflags = (si->info.flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) | (flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED); ++ newflags = (si->info.flags & (CAMEL_STORE_INFO_FOLDER_SUBSCRIBED | CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW)) | (flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED); + if (si->info.flags != newflags) { + si->info.flags = newflags; + camel_store_summary_touch((CamelStoreSummary *)imap_store->summary); +@@ -3074,12 +3074,19 @@ imap_can_refresh_folder (CamelStore *sto + (camel_url_get_param (((CamelService *)store)->url, "check_all") != NULL) || + (camel_url_get_param (((CamelService *)store)->url, "check_lsub") != NULL && (info->flags & CAMEL_FOLDER_SUBSCRIBED) != 0); + +- if (!res && !camel_exception_is_set (ex)) { +- CamelFolder *folder; ++ if (!res && !camel_exception_is_set (ex) && CAMEL_IS_IMAP_STORE (store)) { ++ CamelStoreInfo *si; ++ CamelStoreSummary *sm = CAMEL_STORE_SUMMARY (((CamelImapStore *)(store))->summary); + +- folder = camel_store_get_folder (store, info->full_name, 0, ex); +- if (folder && CAMEL_IS_IMAP_FOLDER (folder)) +- res = CAMEL_IMAP_FOLDER (folder)->check_folder; ++ if (!sm) ++ return FALSE; ++ ++ si = camel_store_summary_path (sm, info->full_name); ++ if (si) { ++ res = (si->flags & CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW) != 0 ? TRUE : FALSE; ++ ++ camel_store_summary_info_free (sm, si); ++ } + } + + return res; +Index: camel/providers/imap/camel-imap-folder.c +=================================================================== +--- camel/providers/imap/camel-imap-folder.c (revision 9761) ++++ camel/providers/imap/camel-imap-folder.c (working copy) +@@ -473,6 +473,7 @@ imap_getv(CamelObject *object, CamelExce + break; } + /* imap args */ + case CAMEL_IMAP_FOLDER_ARG_CHECK_FOLDER: ++ /* The internal value has precedence before the one stored in the summary. */ + *arg->ca_int = ((CamelImapFolder *)object)->check_folder; + break; + /* CamelObject args */ +@@ -514,8 +515,27 @@ imap_setv (CamelObject *object, CamelExc + switch (tag & CAMEL_ARG_TAG) { + case CAMEL_IMAP_FOLDER_ARG_CHECK_FOLDER: + if (((CamelImapFolder *)object)->check_folder != arg->ca_int) { ++ CamelFolder *folder = (CamelFolder *)object; ++ + ((CamelImapFolder *)object)->check_folder = arg->ca_int; + save = 1; ++ ++ /* store both to the summary and to folder cmeta, to have this value restored correctly next time folder is fully loaded */ ++ if (folder->parent_store && CAMEL_IS_IMAP_STORE (folder->parent_store)) { ++ CamelStoreInfo *si; ++ CamelStoreSummary *sm = CAMEL_STORE_SUMMARY (((CamelImapStore *)(folder->parent_store))->summary); ++ ++ si = camel_store_summary_path (sm, folder->full_name); ++ if (si) { ++ if ((si->flags & CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW) != 0 ? 1 : 0 != (arg->ca_int) ? 1 : 0) { ++ si->flags = (si->flags & (~CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW)) | ((arg->ca_int) ? CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW : 0); ++ camel_store_summary_touch (sm); ++ camel_store_summary_save (sm); ++ } ++ ++ camel_store_summary_info_free (sm, si); ++ } ++ } + } + break; + default: +Index: camel/camel-store-summary.h +=================================================================== +--- camel/camel-store-summary.h (revision 9761) ++++ camel/camel-store-summary.h (working copy) +@@ -57,6 +57,7 @@ typedef enum _CamelStoreInfoFlags { + + /* not in camle-store.h yet */ + CAMEL_STORE_INFO_FOLDER_READONLY = 1<<13, ++ CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW = 1<<14, + + CAMEL_STORE_INFO_FOLDER_FLAGGED = 1<<31 + } CamelStoreInfoFlags; diff --git a/bnc-441542-fix-translock.patch b/bnc-441542-fix-translock.patch new file mode 100644 index 0000000..56999c3 --- /dev/null +++ b/bnc-441542-fix-translock.patch @@ -0,0 +1,32 @@ +--- camel/camel-db.c ++++ camel/camel-db.c +@@ -190,7 +190,8 @@ camel_db_begin_transaction (CamelDB *cdb, CamelException *ex) + { + if (!cdb) + return -1; +- g_static_rec_mutex_lock (&trans_lock); ++ if (g_getenv("SQLITE_TRANSLOCK")) ++ g_static_rec_mutex_lock (&trans_lock); + + g_mutex_lock (cdb->lock); + return (cdb_sql_exec (cdb->db, "BEGIN", ex)); +@@ -207,7 +208,8 @@ camel_db_end_transaction (CamelDB *cdb, CamelException *ex) + ret = cdb_sql_exec (cdb->db, "COMMIT", ex); + END; + g_mutex_unlock (cdb->lock); +- g_static_rec_mutex_unlock (&trans_lock); ++ if (g_getenv("SQLITE_TRANSLOCK")) ++ g_static_rec_mutex_unlock (&trans_lock); + + CAMEL_DB_RELEASE_SQLITE_MEMORY; + +@@ -221,7 +223,8 @@ camel_db_abort_transaction (CamelDB *cdb, CamelException *ex) + + ret = cdb_sql_exec (cdb->db, "ROLLBACK", ex); + g_mutex_unlock (cdb->lock); +- g_static_rec_mutex_unlock (&trans_lock); ++ if (g_getenv("SQLITE_TRANSLOCK")) ++ g_static_rec_mutex_unlock (&trans_lock); + CAMEL_DB_RELEASE_SQLITE_MEMORY; + + return ret; diff --git a/bnc-446269-moving-emails-broken.patch b/bnc-446269-moving-emails-broken.patch new file mode 100644 index 0000000..b21f250 --- /dev/null +++ b/bnc-446269-moving-emails-broken.patch @@ -0,0 +1,20 @@ +--- camel/providers/imap/camel-imap-folder.c ++++ camel/providers/imap/camel-imap-folder.c +@@ -2256,12 +2256,12 @@ do_copy (CamelFolder *source, GPtrArray *uids, + if (response) + handle_copyuid_copy_user_tags (response, source, destination); + camel_imap_response_free (store, response); ++ } + +- if (!camel_exception_is_set(ex) && delete_originals) { +- for (i=last;ipdata[i]); +- last = uid; +- } ++ if (!camel_exception_is_set(ex) && delete_originals) { ++ for (i=last;ipdata[i]); ++ last = uid; + } + g_free (uidset); + } diff --git a/bnc-446371-fix-completed-on.patch b/bnc-446371-fix-completed-on.patch new file mode 100644 index 0000000..f5d875e --- /dev/null +++ b/bnc-446371-fix-completed-on.patch @@ -0,0 +1,26 @@ +--- camel/camel-search-sql-sexp.c ++++ camel/camel-search-sql-sexp.c +@@ -150,8 +150,12 @@ func_not(ESExp *f, int argc, struct _ESExpTerm **argv, void *data) + + if (r1->type == ESEXP_RES_STRING) { + r = e_sexp_result_new(f, ESEXP_RES_STRING); +- r->value.string = g_strdup_printf ("(NOT (%s))", +- r1->value.string); ++ /* HACK: Fix and handle completed-on better. */ ++ if (strcmp(r1->value.string, "( (usertags LIKE '%completed-on 0%' AND usertags LIKE '%completed-on%') )") == 0) ++ r->value.string = g_strdup ("( (not (usertags LIKE '%completed-on 0%')) AND usertags LIKE '%completed-on%' )"); ++ else ++ r->value.string = g_strdup_printf ("(NOT (%s))", ++ r1->value.string); + } + e_sexp_result_free (f, r1); + +@@ -439,7 +443,7 @@ user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data) + r = e_sexp_result_new(f, ESEXP_RES_STRING); + /* Hacks no otherway to fix these really :( */ + if (strcmp(argv[0]->value.string, "completed-on") == 0) +- r->value.string = g_strdup_printf("usertags NOT LIKE '%ccompleted-on%c'", '%', '%'); ++ r->value.string = g_strdup_printf("(usertags LIKE '%ccompleted-on 0%c' AND usertags LIKE '%ccompleted-on%c')", '%', '%', '%', '%'); + else if (strcmp(argv[0]->value.string, "follow-up") == 0) + r->value.string = g_strdup_printf("usertags NOT LIKE '%cfollow-up%c'", '%', '%'); + else diff --git a/bnc-446372-fix-empty-trash.patch b/bnc-446372-fix-empty-trash.patch new file mode 100644 index 0000000..dc1f13f --- /dev/null +++ b/bnc-446372-fix-empty-trash.patch @@ -0,0 +1,11 @@ +--- camel/providers/imap/camel-imap-folder.c ++++ camel/providers/imap/camel-imap-folder.c +@@ -1587,6 +1587,8 @@ imap_expunge (CamelFolder *folder, CamelException *ex) + + camel_folder_summary_save_to_db (folder->summary, ex); + uids = camel_db_get_folder_deleted_uids (folder->parent_store->cdb_r, folder->full_name, ex); ++ if (!uids) ++ return; + + if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_AVAIL) + imap_expunge_uids_online (folder, uids, ex); diff --git a/bnc-446373-fix-refresh-vfolderquery.patch b/bnc-446373-fix-refresh-vfolderquery.patch new file mode 100644 index 0000000..666d831 --- /dev/null +++ b/bnc-446373-fix-refresh-vfolderquery.patch @@ -0,0 +1,57 @@ +--- camel/camel-folder-summary.c ++++ camel/camel-folder-summary.c +@@ -2074,25 +2074,24 @@ camel_folder_summary_touch(CamelFolderSummary *s) + void + camel_folder_summary_clear(CamelFolderSummary *s) + { +-#if 0 +- int i; ++ d(printf ("\ncamel_folder_summary_clearcalled \n")); ++ s->flags &= ~CAMEL_SUMMARY_DIRTY; + + CAMEL_SUMMARY_LOCK(s, summary_lock); + if (camel_folder_summary_count(s) == 0) { + CAMEL_SUMMARY_UNLOCK(s, summary_lock); + return; + } ++ ++ g_ptr_array_foreach (s->uids, (GFunc) camel_pstring_free, NULL); ++ g_ptr_array_free (s->uids, TRUE); ++ s->uids = g_ptr_array_new (); ++ s->visible_count = s->deleted_count = s->unread_count = 0; + +- for (i=0;imessages->len;i++) +- camel_message_info_free(s->messages->pdata[i]); ++ g_hash_table_destroy(s->loaded_infos); ++ s->loaded_infos = g_hash_table_new(g_str_hash, g_str_equal); + +- g_ptr_array_set_size(s->messages, 0); +- g_hash_table_destroy(s->messages_uid); +- s->messages_uid = g_hash_table_new(g_str_hash, g_str_equal); +- s->flags |= CAMEL_SUMMARY_DIRTY; +- s->meta_summary->msg_expunged = TRUE; + CAMEL_SUMMARY_UNLOCK(s, summary_lock); +-#endif + } + + /* FIXME: This is non-sense. Neither an exception is passed, +--- camel/camel-vee-folder.c ++++ camel/camel-vee-folder.c +@@ -2064,8 +2064,16 @@ vee_set_expression(CamelVeeFolder *vf, const char *query) + } + + /* Recreate the table when the query changes, only if we are not setting it first */ +- if (vf->expression) ++ if (vf->expression) { ++ CamelFolderSummary *s = ((CamelFolder *)vf)->summary; ++ camel_folder_summary_clear (s); + camel_db_recreate_vfolder (((CamelFolder *) vf)->parent_store->cdb_w, ((CamelFolder *) vf)->full_name, NULL); ++ s->junk_count = 0; ++ s->deleted_count = 0; ++ s->unread_count = 0; ++ s->visible_count = 0; ++ s->junk_not_deleted_count = 0; ++ } + + + g_free(vf->expression); diff --git a/evolution-data-server.changes b/evolution-data-server.changes index 28cf834..2b15f5f 100644 --- a/evolution-data-server.changes +++ b/evolution-data-server.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Thu Nov 20 10:40:30 CET 2008 - abharath@suse.de + +- Patches added + + bnc#431133 - bnc-431133-unread-mail-empty.patch - Mail opened + from the "Unread mails" displays empty. + + bnc#435599 - bnc-435599-junk-contacts-created.patch - Junk + contacts getting created. + + bnc#441347 - bnc-441347-imap-performance-fix.patch - Evolution + 2.24 is terribly slow with large IMAP folders. + + bnc#441542 - bnc-441542-fix-translock.patch - Evolution Hang. + + bnc#446269 - bnc-446269-moving-emails-broken.patch - moving + emails is broken. + + bnc#446371 - bnc-446371-fix-completed-on.patch - Follow-Ups + doesn't work. + + bnc#446372 - bnc-446372-fix-empty-trash.patch - Evolution + crashed while expunging junk messages. + + bnc#446373 - bnc-446373-fix-refresh-vfolderquery.patch - Search + folder "Include threads" setting is unreliable. + + bnc#210959 - bnc-210959-eds-accept_ics.patch - Receving meeting + request from the Personal source should work in + groupwise connector. + + bnc#438730 - bnc-438730-loosing-more-state.patch - mailer: + loosing more state + ------------------------------------------------------------------- Mon Nov 17 11:52:06 CET 2008 - olh@suse.de diff --git a/evolution-data-server.spec b/evolution-data-server.spec index d555499..845add3 100644 --- a/evolution-data-server.spec +++ b/evolution-data-server.spec @@ -57,7 +57,7 @@ Obsoletes: evolution-data-server-32bit %endif Summary: Evolution Data Server Version: 2.24.1.1 -Release: 1 +Release: 2 Source0: ftp://ftp.gnome.org/pub/gnome/sources/evolution-data-server/2.24/%{name}-%{version}.tar.bz2 # PATCH-FIX-UPSTREAM evolution-data-server-1.11.5-cert-auth-complete.patch bgo253574 -- Fix has been submitted to bgo. Patch3: evolution-data-server-1.11.5-cert-auth-complete.patch @@ -69,8 +69,28 @@ Patch5: bnc-307861-calendar-auth.diff Patch6: bnc-441763-show-meeting-icon.patch # PATCH-FEATURE-OPENSUSE dice-eds-changes.patch pchenthill@novell.com -- Patch yet to be pushed upstream Patch7: dice-eds-changes.patch +# PATCH-FIX-UPSTREAM bnc-431133-unread-mail-empty.patch bnc431133 bgo546637 sragavan@novell.com -- Fix has been submitted upstream. +Patch8: bnc-431133-unread-mail-empty.patch +# PATCH-FIX-UPSTREAM bnc-435599-junk-contacts-created.patch bnc435599 shashish@novell.com -- Patch yet to be pushed upstream. +Patch9: bnc-435599-junk-contacts-created.patch +# PATCH-FIX-UPSTREAM bnc-441347-imap-performance-fix.patch bnc441347 bgo558883 -- Fix has been submitted upstream. +Patch10: bnc-441347-imap-performance-fix.patch +# PATCH-FIX-UPSTREAM bnc-441542-fix-translock.patch bnc441542 sragavan@novell.com -- Fix has been submitted upstream. +Patch11: bnc-441542-fix-translock.patch +# PATCH-FIX-UPSTREAM bnc-446269-moving-emails-broken.patch bnc446269 bgo561081 sragavan@novell.com -- Fix has been submitted upstream. +Patch12: bnc-446269-moving-emails-broken.patch +# PATCH-FIX-UPSTREAM bnc-446371-fix-completed-on.patch bnc446371 bgo560076 sragavan@novell.com -- Fix has been submitted upstream. +Patch13: bnc-446371-fix-completed-on.patch +# PATCH-FIX-UPSTREAM bnc-446372-fix-empty-trash.patch bnc446372 bgo561069 sragavan@novell.com -- Fix has been submitted upstream. +Patch14: bnc-446372-fix-empty-trash.patch +# PATCH-FIX-UPSTREAM bnc-446373-fix-refresh-vfolderquery.patch bnc446373 bgo557348 sragavan@novell.com -- Fix has been submitted upstream. +Patch15: bnc-446373-fix-refresh-vfolderquery.patch +# PATCH-FIX-UPSTREAM bnc-210959-eds-accept_ics.patch bnc210959 pchenthill@novell.com -- Patch yet to be pushed upstream. +Patch16: bnc-210959-eds-accept_ics.patch +# PATCH-FIX-UPSTREAM bnc-438730-loosing-more-state.patch bnc438730 sragavan@novell.com -- Patch yet to be pushed upstream. +Patch17: bnc-438730-loosing-more-state.patch # PATCH-FEATURE-OPENSUSE evolution-data-server-shared-nss-db.patch hpj@novell.com -- Migrate to shared NSS database. -Patch10: evolution-data-server-shared-nss-db.patch +Patch18: evolution-data-server-shared-nss-db.patch # PATCH-FIX-OPENSUSE eds-core-mapi-changes.diff msuman@suse.de -- This patch contains changes in the core code base for the MAPI provider. Patch100: eds-core-mapi-changes.diff Url: http://www.gnome.org @@ -145,7 +165,17 @@ documentation. ###%patch5 %patch6 %patch7 -p1 -%patch10 -p1 +%patch8 +%patch9 +%patch10 +%patch11 +%patch12 +%patch13 +%patch14 +%patch15 +%patch16 +%patch17 +%patch18 -p1 %patch100 -p1 %build @@ -218,6 +248,28 @@ echo -e "#!/bin/sh\n\nLD_LIBRARY_PATH=%{_libdir}/evoldap/lib MONO_PATH=%{_libdir %{_datadir}/gtk-doc/html/* %changelog +* Thu Nov 20 2008 abharath@suse.de +- Patches added + + bnc#431133 - bnc-431133-unread-mail-empty.patch - Mail opened + from the "Unread mails" displays empty. + + bnc#435599 - bnc-435599-junk-contacts-created.patch - Junk + contacts getting created. + + bnc#441347 - bnc-441347-imap-performance-fix.patch - Evolution + 2.24 is terribly slow with large IMAP folders. + + bnc#441542 - bnc-441542-fix-translock.patch - Evolution Hang. + + bnc#446269 - bnc-446269-moving-emails-broken.patch - moving + emails is broken. + + bnc#446371 - bnc-446371-fix-completed-on.patch - Follow-Ups + doesn't work. + + bnc#446372 - bnc-446372-fix-empty-trash.patch - Evolution + crashed while expunging junk messages. + + bnc#446373 - bnc-446373-fix-refresh-vfolderquery.patch - Search + folder "Include threads" setting is unreliable. + + bnc#210959 - bnc-210959-eds-accept_ics.patch - Receving meeting + request from the Personal source should work in + groupwise connector. + + bnc#438730 - bnc-438730-loosing-more-state.patch - mailer: + loosing more state * Mon Nov 17 2008 olh@suse.de - obsolete old -XXbit packages (bnc#437293) * Fri Nov 07 2008 psankar@suse.de