diff options
author | Pacho Ramos <pacho@gentoo.org> | 2013-08-09 17:36:32 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2013-08-09 17:36:32 +0000 |
commit | 16373e6e7ec4ab72d1942cc54576c839361b1f84 (patch) | |
tree | 37ee4de078f971fd92690d41c6a53f6fba10e91f /gnome-extra | |
parent | Fix 'Old POP3 mails can be removed before getting them, upstream bug #705446'... (diff) | |
download | gentoo-2-16373e6e7ec4ab72d1942cc54576c839361b1f84.tar.gz gentoo-2-16373e6e7ec4ab72d1942cc54576c839361b1f84.tar.bz2 gentoo-2-16373e6e7ec4ab72d1942cc54576c839361b1f84.zip |
Fix 'Old POP3 mails can be removed before getting them, upstream bug #705446'
(Portage version: 2.1.13.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'gnome-extra')
3 files changed, 308 insertions, 1 deletions
diff --git a/gnome-extra/evolution-data-server/ChangeLog b/gnome-extra/evolution-data-server/ChangeLog index 7f820dcca48b..9dd45f05430b 100644 --- a/gnome-extra/evolution-data-server/ChangeLog +++ b/gnome-extra/evolution-data-server/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for gnome-extra/evolution-data-server # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/evolution-data-server/ChangeLog,v 1.376 2013/07/29 22:03:00 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/evolution-data-server/ChangeLog,v 1.377 2013/08/09 17:36:32 pacho Exp $ + +*evolution-data-server-3.8.4-r1 (09 Aug 2013) + + 09 Aug 2013; Pacho Ramos <pacho@gentoo.org> + +evolution-data-server-3.8.4-r1.ebuild, + +files/evolution-data-server-3.8.4-pop3-removal.patch: + Fix 'Old POP3 mails can be removed before getting them, upstream bug #705446' 29 Jul 2013; Pacho Ramos <pacho@gentoo.org> evolution-data-server-3.8.4.ebuild: diff --git a/gnome-extra/evolution-data-server/evolution-data-server-3.8.4-r1.ebuild b/gnome-extra/evolution-data-server/evolution-data-server-3.8.4-r1.ebuild new file mode 100644 index 000000000000..9327985a35c0 --- /dev/null +++ b/gnome-extra/evolution-data-server/evolution-data-server-3.8.4-r1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/evolution-data-server/evolution-data-server-3.8.4-r1.ebuild,v 1.1 2013/08/09 17:36:32 pacho Exp $ + +EAPI="5" +GCONF_DEBUG="no" +# python3 not really supported, bug #478678 +PYTHON_COMPAT=( python2_7 pypy{1_9,2_0} ) +VALA_MIN_API_VERSION="0.18" +VALA_USE_DEPEND="vapigen" + +inherit db-use eutils flag-o-matic gnome2 python-any-r1 vala virtualx + +DESCRIPTION="Evolution groupware backend" +HOMEPAGE="http://projects.gnome.org/evolution/arch.shtml" + +# Note: explicitly "|| ( LGPL-2 LGPL-3 )", not "LGPL-2+". +LICENSE="|| ( LGPL-2 LGPL-3 ) BSD Sleepycat" +SLOT="0/40" # subslot = libcamel-1.2 soname version +IUSE="api-doc-extras +gnome-online-accounts +gtk +introspection ipv6 ldap kerberos vala +weather" +REQUIRED_USE="vala? ( introspection )" + +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-solaris" + +RDEPEND=" + >=dev-libs/glib-2.34:2 + >=dev-db/sqlite-3.5:= + >=dev-libs/libgdata-0.10:= + >=app-crypt/libsecret-0.5 + >=dev-libs/libical-0.43:= + >=net-libs/libsoup-2.40.3:2.4 + >=dev-libs/libxml2-2 + >=sys-libs/db-4:= + >=dev-libs/nspr-4.4:= + >=dev-libs/nss-3.9:= + >=app-crypt/gcr-3.4 + + sys-libs/zlib:= + virtual/libiconv + + gtk? ( >=x11-libs/gtk+-3.2:3 ) + gnome-online-accounts? ( >=net-libs/gnome-online-accounts-3.7.90 ) + introspection? ( >=dev-libs/gobject-introspection-0.9.12 ) + kerberos? ( virtual/krb5:= ) + ldap? ( >=net-nds/openldap-2:= ) + weather? ( >=dev-libs/libgweather-3.5:2= ) +" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + dev-util/fix-la-relink-command + dev-util/gperf + >=dev-util/gtk-doc-am-1.9 + >=dev-util/intltool-0.35.5 + >=gnome-base/gnome-common-2 + >=sys-devel/gettext-0.17 + virtual/pkgconfig + vala? ( $(vala_depend) )" +# eautoreconf needs: +# >=gnome-base/gnome-common-2 + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_prepare() { + # Old POP3 mails can be removed before getting them, upstream bug #705446 + epatch "${FILESDIR}/${P}-pop3-removal.patch" + + use vala && vala_src_prepare + gnome2_src_prepare + + # /usr/include/db.h is always db-1 on FreeBSD + # so include the right dir in CPPFLAGS + append-cppflags "-I$(db_includedir)" + + # FIXME: Fix compilation flags crazyness + # Touch configure.ac if doing eautoreconf + sed 's/^\(AM_CPPFLAGS="\)$WARNING_FLAGS/\1/' \ + -i configure || die "sed failed" +} + +src_configure() { + # phonenumber does not exist in tree + gnome2_src_configure \ + $(use_enable api-doc-extras gtk-doc) \ + $(use_with api-doc-extras private-docs) \ + $(use_enable gnome-online-accounts goa) \ + $(use_enable introspection) \ + $(use_enable ipv6) \ + $(use_with kerberos krb5 "${EPREFIX}"/usr) \ + $(use_with ldap openldap) \ + $(use_enable vala vala-bindings) \ + $(use_enable weather) \ + $(use_enable gtk) \ + --enable-google \ + --enable-nntp \ + --enable-largefile \ + --enable-smime \ + --with-libdb="${EPREFIX}"/usr \ + --without-phonenumber \ + --disable-uoa +} + +src_install() { + # Prevent this evolution-data-server from linking to libs in the installed + # evolution-data-server libraries by adding -L arguments for build dirs to + # every .la file's relink_command field, forcing libtool to look there + # first during relinking. This will mangle the .la files installed by + # make install, but we don't care because we will be punting them anyway. + fix-la-relink-command . || die "fix-la-relink-command failed" + gnome2_src_install + + if use ldap; then + insinto /etc/openldap/schema + doins "${FILESDIR}"/calentry.schema + dosym /usr/share/${PN}/evolutionperson.schema /etc/openldap/schema/evolutionperson.schema + fi +} + +src_test() { + unset DBUS_SESSION_BUS_ADDRESS + unset ORBIT_SOCKETDIR + unset SESSION_MANAGER + unset DISPLAY + Xemake check +} diff --git a/gnome-extra/evolution-data-server/files/evolution-data-server-3.8.4-pop3-removal.patch b/gnome-extra/evolution-data-server/files/evolution-data-server-3.8.4-pop3-removal.patch new file mode 100644 index 000000000000..7103b16ab5fd --- /dev/null +++ b/gnome-extra/evolution-data-server/files/evolution-data-server-3.8.4-pop3-removal.patch @@ -0,0 +1,174 @@ +From 809b48f1f1fa3a5f242d311be236a93bb012db53 Mon Sep 17 00:00:00 2001 +From: Milan Crha <mcrha@redhat.com> +Date: Thu, 08 Aug 2013 05:46:53 +0000 +Subject: Bug #705446 - Old POP3 mails can be removed before getting them + +--- +diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c +index 2395c12..8390ef9 100644 +--- a/camel/providers/pop3/camel-pop3-folder.c ++++ b/camel/providers/pop3/camel-pop3-folder.c +@@ -443,6 +443,47 @@ pop3_folder_get_uids (CamelFolder *folder) + return uids; + } + ++static GPtrArray * ++pop3_get_uncached_uids (CamelFolder *folder, ++ GPtrArray *uids, ++ GError **error) ++{ ++ CamelPOP3Folder *pop3_folder; ++ CamelPOP3Store *pop3_store; ++ CamelDataCache *pop3_cache; ++ GPtrArray *uncached_uids; ++ gint ii; ++ ++ g_return_val_if_fail (CAMEL_IS_POP3_FOLDER (folder), NULL); ++ g_return_val_if_fail (uids != NULL, NULL); ++ ++ pop3_folder = CAMEL_POP3_FOLDER (folder); ++ pop3_store = CAMEL_POP3_STORE (camel_folder_get_parent_store (folder)); ++ pop3_cache = camel_pop3_store_ref_cache (pop3_store); ++ ++ uncached_uids = g_ptr_array_new (); ++ ++ for (ii = 0; ii < uids->len; ii++) { ++ const gchar *uid = uids->pdata[ii]; ++ CamelStream *stream = NULL; ++ CamelPOP3FolderInfo *fi; ++ gchar buffer[1]; ++ ++ fi = g_hash_table_lookup (pop3_folder->uids_fi, uid); ++ if (!fi || !pop3_cache || ++ (stream = camel_data_cache_get (pop3_cache, "cache", fi->uid, NULL)) == NULL || ++ camel_stream_read (stream, buffer, 1, NULL, NULL) != 1 || ++ buffer[0] != '#') ++ g_ptr_array_add (uncached_uids, (gpointer) camel_pstring_strdup (uid)); ++ ++ g_clear_object (&stream); ++ } ++ ++ g_clear_object (&pop3_cache); ++ ++ return uncached_uids; ++} ++ + static gchar * + pop3_folder_get_filename (CamelFolder *folder, + const gchar *uid, +@@ -920,7 +961,7 @@ pop3_folder_synchronize_sync (CamelFolder *folder, + + g_object_unref (settings); + +- if (is_online && delete_after_days > 0 && !expunge) { ++ if (is_online && delete_after_days > 0 && !expunge && !g_cancellable_is_cancelled (cancellable)) { + camel_operation_push_message ( + cancellable, _("Expunging old messages")); + +@@ -930,6 +971,12 @@ pop3_folder_synchronize_sync (CamelFolder *folder, + camel_operation_pop_message (cancellable); + } + ++ if (g_cancellable_is_cancelled (cancellable)) { ++ if (error && !*error) ++ g_cancellable_set_error_if_cancelled (cancellable, error); ++ return FALSE; ++ } ++ + if (!expunge || (keep_on_server && !delete_expunged)) + return TRUE; + +@@ -948,6 +995,15 @@ pop3_folder_synchronize_sync (CamelFolder *folder, + pop3_engine = camel_pop3_store_ref_engine (pop3_store); + + for (i = 0; i < pop3_folder->uids->len; i++) { ++ if (g_cancellable_set_error_if_cancelled (cancellable, error)) { ++ g_clear_object (&pop3_cache); ++ g_clear_object (&pop3_engine); ++ ++ camel_operation_pop_message (cancellable); ++ ++ return FALSE; ++ } ++ + fi = pop3_folder->uids->pdata[i]; + /* busy already? wait for that to finish first */ + if (fi->cmd) { +@@ -971,6 +1027,15 @@ pop3_folder_synchronize_sync (CamelFolder *folder, + } + + for (i = 0; i < pop3_folder->uids->len; i++) { ++ if (g_cancellable_set_error_if_cancelled (cancellable, error)) { ++ g_clear_object (&pop3_cache); ++ g_clear_object (&pop3_engine); ++ ++ camel_operation_pop_message (cancellable); ++ ++ return FALSE; ++ } ++ + fi = pop3_folder->uids->pdata[i]; + /* wait for delete commands to finish */ + if (fi->cmd) { +@@ -1005,6 +1070,7 @@ camel_pop3_folder_class_init (CamelPOP3FolderClass *class) + folder_class->get_message_count = pop3_folder_get_message_count; + folder_class->get_uids = pop3_folder_get_uids; + folder_class->free_uids = camel_folder_free_shallow; ++ folder_class->get_uncached_uids = pop3_get_uncached_uids; + folder_class->get_filename = pop3_folder_get_filename; + folder_class->set_message_flags = pop3_folder_set_message_flags; + folder_class->get_message_sync = pop3_folder_get_message_sync; +@@ -1151,6 +1217,9 @@ camel_pop3_delete_old (CamelFolder *folder, + return FALSE; + } + ++ if (g_cancellable_set_error_if_cancelled (cancellable, error)) ++ return FALSE; ++ + pop3_folder = CAMEL_POP3_FOLDER (folder); + pop3_store = CAMEL_POP3_STORE (parent_store); + pop3_cache = camel_pop3_store_ref_cache (pop3_store); +@@ -1163,6 +1232,13 @@ camel_pop3_delete_old (CamelFolder *folder, + message_time = 0; + fi = pop3_folder->uids->pdata[i]; + ++ if (g_cancellable_set_error_if_cancelled (cancellable, error)) { ++ g_clear_object (&pop3_cache); ++ g_clear_object (&pop3_engine); ++ ++ return FALSE; ++ } ++ + if (fi->cmd) { + while (camel_pop3_engine_iterate (pop3_engine, fi->cmd, cancellable, NULL) > 0) { + ; /* do nothing - iterating until end */ +@@ -1199,6 +1275,13 @@ camel_pop3_delete_old (CamelFolder *folder, + __FILE__, __LINE__, day_lag, days_to_delete)); + + if (day_lag > days_to_delete) { ++ if (g_cancellable_set_error_if_cancelled (cancellable, error)) { ++ g_clear_object (&pop3_cache); ++ g_clear_object (&pop3_engine); ++ ++ return FALSE; ++ } ++ + if (fi->cmd) { + while (camel_pop3_engine_iterate (pop3_engine, fi->cmd, cancellable, NULL) > 0) { + ; /* do nothing - iterating until end */ +@@ -1224,6 +1307,13 @@ camel_pop3_delete_old (CamelFolder *folder, + } + + for (i = 0; i < pop3_folder->uids->len; i++) { ++ if (g_cancellable_set_error_if_cancelled (cancellable, error)) { ++ g_clear_object (&pop3_cache); ++ g_clear_object (&pop3_engine); ++ ++ return FALSE; ++ } ++ + fi = pop3_folder->uids->pdata[i]; + /* wait for delete commands to finish */ + if (fi->cmd) { +-- +cgit v0.9.2 |