Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in gnome-extra/evolution-data-server/files: evolution-data-server-2.22.3-mail-cleanup-delay.patch evolution-data-server-2.22.3-timezone-western.patch
Date: Sun, 12 Oct 2008 16:29:04
Message-Id: E1Kp3oT-0008TI-U9@stork.gentoo.org
1 eva 08/10/12 16:29:01
2
3 Added:
4 evolution-data-server-2.22.3-mail-cleanup-delay.patch
5 evolution-data-server-2.22.3-timezone-western.patch
6 Log:
7 bump to 2.22.3-r1, backport upstream bug fixes announced on distributor list.
8 (Portage version: 2.2_rc11/cvs/Linux 2.6.24-gentoo-r8 i686)
9
10 Revision Changes Path
11 1.1 gnome-extra/evolution-data-server/files/evolution-data-server-2.22.3-mail-cleanup-delay.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/evolution-data-server/files/evolution-data-server-2.22.3-mail-cleanup-delay.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/evolution-data-server/files/evolution-data-server-2.22.3-mail-cleanup-delay.patch?rev=1.1&content-type=text/plain
15
16 Index: evolution-data-server-2.22.3-mail-cleanup-delay.patch
17 ===================================================================
18 ---
19
20 At http://bugzilla.gnome.org/show_bug.cgi?id=514827
21
22 I have POP account in web.de
23 I would like to leave in server only 1 days, and older messages should be
24 deleted.
25 I tried to do this with the pop account preference setting:
26 x Leave messages on server
27 x Delete messages older than 1 days
28
29 However, the messages are still kept in the server although it is more than
30 several days.
31
32 Index: b/camel/providers/pop3/camel-pop3-folder.c
33 ===================================================================
34 --- a/camel/providers/pop3/camel-pop3-folder.c (revision 9476)
35 +++ b/camel/providers/pop3/camel-pop3-folder.c (working copy)
36 @@ -356,6 +356,48 @@
37 camel_pop3_store_expunge (pop3_store, ex);
38 }
39
40 +static gboolean
41 +pop3_get_message_time_from_cache (CamelFolder *folder, const char *uid, time_t *message_time)
42 +{
43 + CamelPOP3Store *pop3_store;
44 + CamelStream *stream = NULL;
45 + char buffer[1];
46 + gboolean res = FALSE;
47 +
48 + g_return_val_if_fail (folder != NULL, FALSE);
49 + g_return_val_if_fail (uid != NULL, FALSE);
50 + g_return_val_if_fail (message_time != NULL, FALSE);
51 +
52 + pop3_store = CAMEL_POP3_STORE (folder->parent_store);
53 +
54 + g_return_val_if_fail (pop3_store->cache != NULL, FALSE);
55 +
56 + if ((stream = camel_data_cache_get (pop3_store->cache, "cache", uid, NULL)) != NULL
57 + && camel_stream_read (stream, buffer, 1) == 1
58 + && buffer[0] == '#') {
59 + CamelMimeMessage *message;
60 +
61 + message = camel_mime_message_new ();
62 + if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)message, stream) == -1) {
63 + g_warning (_("Cannot get message %s: %s"), uid, g_strerror (errno));
64 + camel_object_unref ((CamelObject *)message);
65 + message = NULL;
66 + }
67 +
68 + if (message) {
69 + res = TRUE;
70 + *message_time = message->date + message->date_offset;
71 +
72 + camel_object_unref ((CamelObject *)message);
73 + }
74 + }
75 +
76 + if (stream) {
77 + camel_object_unref (stream);
78 + }
79 + return res;
80 +}
81 +
82 int
83 camel_pop3_delete_old(CamelFolder *folder, int days_to_delete, CamelException *ex)
84 {
85 @@ -363,8 +405,7 @@
86 CamelPOP3FolderInfo *fi;
87 int i;
88 CamelPOP3Store *pop3_store;
89 - time_t temp;
90 - CamelMessageInfo *minfo;
91 + time_t temp, message_time;
92
93 pop3_folder = CAMEL_POP3_FOLDER (folder);
94 pop3_store = CAMEL_POP3_STORE (CAMEL_FOLDER(pop3_folder)->parent_store);
95 @@ -374,10 +415,8 @@
96 for (i = 0; i < pop3_folder->uids->len; i++) {
97 fi = pop3_folder->uids->pdata[i];
98
99 - minfo = camel_folder_get_message_info (folder, fi->uid);
100 d(printf("%s(%d): fi->uid=[%s]\n", __FILE__, __LINE__, fi->uid));
101 - if(minfo) {
102 - time_t message_time = ((CamelMessageInfoBase *)minfo)->date_received;
103 + if (pop3_get_message_time_from_cache (folder, fi->uid, &message_time)) {
104 double time_diff = difftime(temp,message_time);
105 int day_lag = time_diff/(60*60*24);
106
107 @@ -407,8 +446,6 @@
108 camel_data_cache_remove(pop3_store->cache, "cache", fi->uid, NULL);
109 }
110 }
111 - /* free message - not used anymore */
112 - camel_folder_free_message_info (folder, minfo);
113 }
114 }
115
116
117
118
119 1.1 gnome-extra/evolution-data-server/files/evolution-data-server-2.22.3-timezone-western.patch
120
121 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/evolution-data-server/files/evolution-data-server-2.22.3-timezone-western.patch?rev=1.1&view=markup
122 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-extra/evolution-data-server/files/evolution-data-server-2.22.3-timezone-western.patch?rev=1.1&content-type=text/plain
123
124 Index: evolution-data-server-2.22.3-timezone-western.patch
125 ===================================================================
126 ---
127 At http://bugzilla.gnome.org/show_bug.cgi?id=548268
128
129 As discussed in bug #528902, Evolution now uses time zone information extracted
130 from the binary system time zone database.
131
132 This conversion fails in at least in one case: Germany's (and therefore
133 probably much of Western Europe) switch from summer saving time to normal time
134 is exported in iCalendar events as [...]
135
136 Index: b/calendar/libical/src/libical/icaltz-util.c
137 ===================================================================
138 --- a/calendar/libical/src/libical/icaltz-util.c (revision 646)
139 +++ b/calendar/libical/src/libical/icaltz-util.c (working copy)
140 @@ -198,6 +198,21 @@ icaltzutil_get_zone_directory (void)
141 return zdir;
142 }
143
144 +/* Calculate the relative position of the week in a month from a date */
145 +static int
146 +calculate_pos (icaltimetype icaltime)
147 +{
148 + int pos;
149 +
150 + pos = (icaltime.day -1) / 7;
151 +
152 + /* Check if pos 3 is the last occurence of the week day in the month */
153 + if (pos == 3 && ((icaltime.day + 7) > icaltime_days_in_month (icaltime.month, icaltime.year)))
154 + pos = 4;
155 +
156 + return r_pos [pos];
157 +}
158 +
159 icalcomponent*
160 icaltzutil_fetch_timezone (const char *location)
161 {
162 @@ -349,7 +364,7 @@ icaltzutil_fetch_timezone (const char *l
163 icalrecurrencetype_clear (&ical_recur);
164 ical_recur.freq = ICAL_YEARLY_RECURRENCE;
165 ical_recur.by_month [0] = icaltime.month;
166 - pos = r_pos [icaltime.day/7];
167 + pos = calculate_pos (icaltime);
168 pos < 0 ? (sign = -1): (sign = 1);
169 ical_recur.by_day [0] = sign * ((abs (pos) * 8) + icaltime_day_of_week (icaltime));
170 icalprop = icalproperty_new_rrule (ical_recur);
171 @@ -387,7 +402,7 @@ icaltzutil_fetch_timezone (const char *l
172 icalrecurrencetype_clear (&ical_recur);
173 ical_recur.freq = ICAL_YEARLY_RECURRENCE;
174 ical_recur.by_month [0] = icaltime.month;
175 - pos = r_pos [icaltime.day/7];
176 + pos = calculate_pos (icaltime);
177 pos < 0 ? (sign = -1): (sign = 1);
178 ical_recur.by_day [0] = sign * ((abs (pos) * 8) + icaltime_day_of_week (icaltime));
179 icalprop = icalproperty_new_rrule (ical_recur);