Merge lp:~renatofilho/address-book-service/create-eds-extension-package into lp:address-book-service
- create-eds-extension-package
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Bill Filler |
Approved revision: | 214 |
Merged at revision: | 208 |
Proposed branch: | lp:~renatofilho/address-book-service/create-eds-extension-package |
Merge into: | lp:address-book-service |
Diff against target: |
438 lines (+257/-7) 9 files modified
debian/address-book-service.install (+0/-2) debian/control (+23/-0) debian/evolution-data-server-ubuntu-dev.install (+2/-0) debian/evolution-data-server-ubuntu.install (+2/-0) eds-extension/CMakeLists.txt (+12/-1) eds-extension/e-source-ubuntu.c (+181/-1) eds-extension/e-source-ubuntu.h (+9/-0) eds-extension/evolution-data-server-ubuntu.pc.in (+11/-0) eds-extension/module-ubuntu-sources.c (+17/-3) |
To merge this branch: | bzr merge lp:~renatofilho/address-book-service/create-eds-extension-package |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
system-apps-ci-bot | continuous-integration | Approve | |
Ken VanDine | packaging | Approve | |
PS Jenkins bot | continuous-integration | Pending | |
Review via email: mp+296447@code.launchpad.net |
Commit message
Created a debian package "evolution-
Description of the change
- 208. By Renato Araujo Oliveira Filho
-
Created a debian package "evolution-
data-server- ubuntu" to used by others projects. - 209. By Renato Araujo Oliveira Filho
-
Fix package build.
- 210. By Renato Araujo Oliveira Filho
-
Add a 'metatada' field into the ubuntu eds extension.
Allow to use for any arbitrary data.
- 211. By Renato Araujo Oliveira Filho
-
Avoid warnings when using account-id 0.
- 212. By Renato Araujo Oliveira Filho
-
Does not delete sources if account-id is 0.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
- 213. By Renato Araujo Oliveira Filho
-
Fix memory leak.
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:213
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Ken VanDine (ken-vandine) wrote : | # |
The description of evolution-
- 214. By Renato Araujo Oliveira Filho
-
Extend dev package description.
Ken VanDine (ken-vandine) wrote : | # |
Packaging is good
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:214
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'debian/address-book-service.install' | |||
2 | --- debian/address-book-service.install 2015-10-15 15:26:45 +0000 | |||
3 | +++ debian/address-book-service.install 2016-07-11 14:39:54 +0000 | |||
4 | @@ -1,5 +1,3 @@ | |||
5 | 1 | usr/lib/*/libubuntu-source-eds.so | ||
6 | 2 | usr/lib/evolution-data-server/registry-modules/module-ubuntu-sources.so | ||
7 | 3 | usr/lib/*/address-book-service/address-book-service | 1 | usr/lib/*/address-book-service/address-book-service |
8 | 4 | usr/share/upstart/sessions/address-book-service.conf | 2 | usr/share/upstart/sessions/address-book-service.conf |
9 | 5 | usr/share/locale/*/LC_MESSAGES/address-book-service.mo | 3 | usr/share/locale/*/LC_MESSAGES/address-book-service.mo |
10 | 6 | 4 | ||
11 | === modified file 'debian/control' | |||
12 | --- debian/control 2015-10-15 15:26:45 +0000 | |||
13 | +++ debian/control 2016-07-11 14:39:54 +0000 | |||
14 | @@ -34,6 +34,7 @@ | |||
15 | 34 | Architecture: any | 34 | Architecture: any |
16 | 35 | Multi-Arch: same | 35 | Multi-Arch: same |
17 | 36 | Depends: address-book-updater (= ${binary:Version}), | 36 | Depends: address-book-updater (= ${binary:Version}), |
18 | 37 | evolution-data-server-ubuntu (= ${binary:Version}), | ||
19 | 37 | evolution-data-server(>= 3.12.11), | 38 | evolution-data-server(>= 3.12.11), |
20 | 38 | libfolks-eds25, | 39 | libfolks-eds25, |
21 | 39 | ${misc:Depends}, | 40 | ${misc:Depends}, |
22 | @@ -78,3 +79,25 @@ | |||
23 | 78 | Description: Ubuntu contact service updater | 79 | Description: Ubuntu contact service updater |
24 | 79 | A helper program to update address book service and address book app configuration and sync files. | 80 | A helper program to update address book service and address book app configuration and sync files. |
25 | 80 | 81 | ||
26 | 82 | Package: evolution-data-server-ubuntu | ||
27 | 83 | Architecture: any | ||
28 | 84 | Multi-Arch: same | ||
29 | 85 | Depends: ${misc:Depends}, | ||
30 | 86 | ${shlibs:Depends}, | ||
31 | 87 | Description: EDS extension used by Ubuntu apps | ||
32 | 88 | An EDS extension used by Ubuntu apps to store metadata about the online account and sync infomation. | ||
33 | 89 | |||
34 | 90 | Package: evolution-data-server-ubuntu-dev | ||
35 | 91 | Architecture: any | ||
36 | 92 | Multi-Arch: same | ||
37 | 93 | Depends: evolution-data-server-ubuntu (= ${binary:Version}), | ||
38 | 94 | ${misc:Depends}, | ||
39 | 95 | ${shlibs:Depends}, | ||
40 | 96 | Description: EDS extension used by Ubuntu apps | ||
41 | 97 | An EDS extension used by Ubuntu apps to store metadata about the online account and sync infomation. | ||
42 | 98 | . | ||
43 | 99 | This package contains header files for evolution-data-server-ubuntu. | ||
44 | 100 | |||
45 | 101 | |||
46 | 102 | |||
47 | 103 | |||
48 | 81 | 104 | ||
49 | === added file 'debian/evolution-data-server-ubuntu-dev.install' | |||
50 | --- debian/evolution-data-server-ubuntu-dev.install 1970-01-01 00:00:00 +0000 | |||
51 | +++ debian/evolution-data-server-ubuntu-dev.install 2016-07-11 14:39:54 +0000 | |||
52 | @@ -0,0 +1,2 @@ | |||
53 | 1 | usr/include/evolution-data-server-ubuntu/e-source-ubuntu.h | ||
54 | 2 | usr/share/pkgconfig/evolution-data-server-ubuntu.pc | ||
55 | 0 | 3 | ||
56 | === added file 'debian/evolution-data-server-ubuntu.install' | |||
57 | --- debian/evolution-data-server-ubuntu.install 1970-01-01 00:00:00 +0000 | |||
58 | +++ debian/evolution-data-server-ubuntu.install 2016-07-11 14:39:54 +0000 | |||
59 | @@ -0,0 +1,2 @@ | |||
60 | 1 | usr/lib/evolution-data-server/registry-modules/module-ubuntu-sources.so | ||
61 | 2 | usr/lib/*/libubuntu-source-eds.so | ||
62 | 0 | 3 | ||
63 | === modified file 'eds-extension/CMakeLists.txt' | |||
64 | --- eds-extension/CMakeLists.txt 2015-07-13 20:25:36 +0000 | |||
65 | +++ eds-extension/CMakeLists.txt 2016-07-11 14:39:54 +0000 | |||
66 | @@ -13,12 +13,17 @@ | |||
67 | 13 | OUTPUT_VARIABLE EDS_MODULES_DIR | 13 | OUTPUT_VARIABLE EDS_MODULES_DIR |
68 | 14 | OUTPUT_STRIP_TRAILING_WHITESPACE | 14 | OUTPUT_STRIP_TRAILING_WHITESPACE |
69 | 15 | ) | 15 | ) |
70 | 16 | set(UBUNTU_SOURCE_PC_FILE evolution-data-server-ubuntu.pc) | ||
71 | 17 | configure_file(${UBUNTU_SOURCE_PC_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${UBUNTU_SOURCE_PC_FILE} @ONLY) | ||
72 | 16 | 18 | ||
73 | 17 | # Ubuntu Source | 19 | # Ubuntu Source |
74 | 18 | set(UBUNTU_SOURCE_LIB ubuntu-source-eds) | 20 | set(UBUNTU_SOURCE_LIB ubuntu-source-eds) |
75 | 21 | set(UBUNTU_SOURCE_LIB_HEADERS | ||
76 | 22 | e-source-ubuntu.h | ||
77 | 23 | ) | ||
78 | 19 | set(UBUNTU_SOURCE_LIB_SRCS | 24 | set(UBUNTU_SOURCE_LIB_SRCS |
79 | 20 | e-source-ubuntu.c | 25 | e-source-ubuntu.c |
81 | 21 | e-source-ubuntu.h | 26 | ${UBUNTU_SOURCE_LIB_HEADERS} |
82 | 22 | ) | 27 | ) |
83 | 23 | add_library(${UBUNTU_SOURCE_LIB} SHARED | 28 | add_library(${UBUNTU_SOURCE_LIB} SHARED |
84 | 24 | ${UBUNTU_SOURCE_LIB_SRCS} | 29 | ${UBUNTU_SOURCE_LIB_SRCS} |
85 | @@ -32,6 +37,12 @@ | |||
86 | 32 | install(TARGETS ${UBUNTU_SOURCE_LIB} | 37 | install(TARGETS ${UBUNTU_SOURCE_LIB} |
87 | 33 | LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} | 38 | LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} |
88 | 34 | ) | 39 | ) |
89 | 40 | install(FILES ${UBUNTU_SOURCE_LIB_HEADERS} | ||
90 | 41 | DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/evolution-data-server-ubuntu | ||
91 | 42 | ) | ||
92 | 43 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${UBUNTU_SOURCE_PC_FILE} | ||
93 | 44 | DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/pkgconfig/ | ||
94 | 45 | ) | ||
95 | 35 | 46 | ||
96 | 36 | # Module Ubuntu Sources | 47 | # Module Ubuntu Sources |
97 | 37 | set(MODULE_UBUNTU_SOURCES module-ubuntu-sources) | 48 | set(MODULE_UBUNTU_SOURCES module-ubuntu-sources) |
98 | 38 | 49 | ||
99 | === modified file 'eds-extension/e-source-ubuntu.c' | |||
100 | --- eds-extension/e-source-ubuntu.c 2015-07-13 20:25:36 +0000 | |||
101 | +++ eds-extension/e-source-ubuntu.c 2016-07-11 14:39:54 +0000 | |||
102 | @@ -39,7 +39,9 @@ | |||
103 | 39 | guint account_id; | 39 | guint account_id; |
104 | 40 | gchar *application_id; | 40 | gchar *application_id; |
105 | 41 | gboolean auto_remove; | 41 | gboolean auto_remove; |
106 | 42 | gboolean writable; | ||
107 | 42 | gchar *provider; | 43 | gchar *provider; |
108 | 44 | gchar *metadata; | ||
109 | 43 | AgAccount *account; | 45 | AgAccount *account; |
110 | 44 | }; | 46 | }; |
111 | 45 | 47 | ||
112 | @@ -48,7 +50,9 @@ | |||
113 | 48 | PROP_ACCOUNT_ID, | 50 | PROP_ACCOUNT_ID, |
114 | 49 | PROP_APPLICATION_ID, | 51 | PROP_APPLICATION_ID, |
115 | 50 | PROP_AUTOREMOVE, | 52 | PROP_AUTOREMOVE, |
117 | 51 | PROP_ACCOUNT_PROVIDER | 53 | PROP_ACCOUNT_PROVIDER, |
118 | 54 | PROP_WRITABLE, | ||
119 | 55 | PROP_METADATA | ||
120 | 52 | }; | 56 | }; |
121 | 53 | 57 | ||
122 | 54 | G_DEFINE_TYPE ( | 58 | G_DEFINE_TYPE ( |
123 | @@ -77,6 +81,15 @@ | |||
124 | 77 | e_source_ubuntu_set_autoremove (E_SOURCE_UBUNTU (object), | 81 | e_source_ubuntu_set_autoremove (E_SOURCE_UBUNTU (object), |
125 | 78 | g_value_get_boolean (value)); | 82 | g_value_get_boolean (value)); |
126 | 79 | return; | 83 | return; |
127 | 84 | case PROP_WRITABLE: | ||
128 | 85 | e_source_ubuntu_set_writable (E_SOURCE_UBUNTU (object), | ||
129 | 86 | g_value_get_boolean (value)); | ||
130 | 87 | return; | ||
131 | 88 | |||
132 | 89 | case PROP_METADATA: | ||
133 | 90 | e_source_ubuntu_set_metadata (E_SOURCE_UBUNTU (object), | ||
134 | 91 | g_value_get_string (value)); | ||
135 | 92 | return; | ||
136 | 80 | } | 93 | } |
137 | 81 | 94 | ||
138 | 82 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); | 95 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); |
139 | @@ -109,6 +122,15 @@ | |||
140 | 109 | e_source_ubuntu_dup_account_provider (E_SOURCE_UBUNTU (object))); | 122 | e_source_ubuntu_dup_account_provider (E_SOURCE_UBUNTU (object))); |
141 | 110 | return; | 123 | return; |
142 | 111 | 124 | ||
143 | 125 | case PROP_WRITABLE: | ||
144 | 126 | g_value_set_boolean (value, | ||
145 | 127 | e_source_ubuntu_get_writable (E_SOURCE_UBUNTU (object))); | ||
146 | 128 | return; | ||
147 | 129 | |||
148 | 130 | case PROP_METADATA: | ||
149 | 131 | g_value_take_string (value, | ||
150 | 132 | e_source_ubuntu_dup_metadata(E_SOURCE_UBUNTU (object))); | ||
151 | 133 | return; | ||
152 | 112 | } | 134 | } |
153 | 113 | 135 | ||
154 | 114 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); | 136 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); |
155 | @@ -128,6 +150,7 @@ | |||
156 | 128 | 150 | ||
157 | 129 | g_free (priv->application_id); | 151 | g_free (priv->application_id); |
158 | 130 | g_free (priv->provider); | 152 | g_free (priv->provider); |
159 | 153 | g_free (priv->metadata); | ||
160 | 131 | 154 | ||
161 | 132 | /* Chain up to parent's finalize() method. */ | 155 | /* Chain up to parent's finalize() method. */ |
162 | 133 | G_OBJECT_CLASS (e_source_ubuntu_parent_class)->finalize (object); | 156 | G_OBJECT_CLASS (e_source_ubuntu_parent_class)->finalize (object); |
163 | @@ -190,6 +213,32 @@ | |||
164 | 190 | 213 | ||
165 | 191 | g_object_class_install_property ( | 214 | g_object_class_install_property ( |
166 | 192 | object_class, | 215 | object_class, |
167 | 216 | PROP_WRITABLE, | ||
168 | 217 | g_param_spec_boolean ( | ||
169 | 218 | "writable", | ||
170 | 219 | "Writable source", | ||
171 | 220 | "Writable source", | ||
172 | 221 | TRUE, | ||
173 | 222 | G_PARAM_READWRITE | | ||
174 | 223 | G_PARAM_CONSTRUCT | | ||
175 | 224 | G_PARAM_STATIC_STRINGS | | ||
176 | 225 | E_SOURCE_PARAM_SETTING)); | ||
177 | 226 | |||
178 | 227 | g_object_class_install_property ( | ||
179 | 228 | object_class, | ||
180 | 229 | PROP_METADATA, | ||
181 | 230 | g_param_spec_string ( | ||
182 | 231 | "metadata", | ||
183 | 232 | "metadata", | ||
184 | 233 | "Source metadata", | ||
185 | 234 | NULL, | ||
186 | 235 | G_PARAM_READWRITE | | ||
187 | 236 | G_PARAM_CONSTRUCT | | ||
188 | 237 | G_PARAM_STATIC_STRINGS | | ||
189 | 238 | E_SOURCE_PARAM_SETTING)); | ||
190 | 239 | |||
191 | 240 | g_object_class_install_property ( | ||
192 | 241 | object_class, | ||
193 | 193 | PROP_ACCOUNT_PROVIDER, | 242 | PROP_ACCOUNT_PROVIDER, |
194 | 194 | g_param_spec_string ( | 243 | g_param_spec_string ( |
195 | 195 | "account-provider", | 244 | "account-provider", |
196 | @@ -260,6 +309,7 @@ | |||
197 | 260 | if (account_id != 0) { | 309 | if (account_id != 0) { |
198 | 261 | AgManager *manager = ag_manager_new (); | 310 | AgManager *manager = ag_manager_new (); |
199 | 262 | extension->priv->account = ag_manager_get_account (manager, account_id); | 311 | extension->priv->account = ag_manager_get_account (manager, account_id); |
200 | 312 | g_object_unref (manager); | ||
201 | 263 | } | 313 | } |
202 | 264 | 314 | ||
203 | 265 | g_mutex_unlock (&extension->priv->property_lock); | 315 | g_mutex_unlock (&extension->priv->property_lock); |
204 | @@ -408,3 +458,133 @@ | |||
205 | 408 | 458 | ||
206 | 409 | g_object_notify (G_OBJECT (extension), "auto-remove"); | 459 | g_object_notify (G_OBJECT (extension), "auto-remove"); |
207 | 410 | } | 460 | } |
208 | 461 | |||
209 | 462 | /** | ||
210 | 463 | * e_source_ubuntu_get_writable: | ||
211 | 464 | * @extension: an #ESourceUbuntu | ||
212 | 465 | * | ||
213 | 466 | * This can be used as extra flag. | ||
214 | 467 | * For example for sources that are created from read-only remote sources. | ||
215 | 468 | * | ||
216 | 469 | * Returns: True if the source is marked as writable or False if not. | ||
217 | 470 | * | ||
218 | 471 | **/ | ||
219 | 472 | gboolean | ||
220 | 473 | e_source_ubuntu_get_writable(ESourceUbuntu *extension) | ||
221 | 474 | { | ||
222 | 475 | g_return_val_if_fail (E_IS_SOURCE_UBUNTU (extension), FALSE); | ||
223 | 476 | |||
224 | 477 | return extension->priv->writable; | ||
225 | 478 | } | ||
226 | 479 | |||
227 | 480 | /** | ||
228 | 481 | * e_source_ubuntu_set_writable: | ||
229 | 482 | * @extension: an #ESourceUbuntu | ||
230 | 483 | * | ||
231 | 484 | * This can be used as extra flag. | ||
232 | 485 | * For example for sources that are created from read-only remote sources. | ||
233 | 486 | * | ||
234 | 487 | * Sets if the source should be considered writable or not. | ||
235 | 488 | * | ||
236 | 489 | **/ | ||
237 | 490 | void | ||
238 | 491 | e_source_ubuntu_set_writable(ESourceUbuntu *extension, | ||
239 | 492 | gboolean flag) | ||
240 | 493 | { | ||
241 | 494 | g_return_if_fail (E_IS_SOURCE_UBUNTU (extension)); | ||
242 | 495 | |||
243 | 496 | g_mutex_lock (&extension->priv->property_lock); | ||
244 | 497 | |||
245 | 498 | if (extension->priv->writable == flag) { | ||
246 | 499 | g_mutex_unlock (&extension->priv->property_lock); | ||
247 | 500 | return; | ||
248 | 501 | } | ||
249 | 502 | |||
250 | 503 | extension->priv->writable = flag; | ||
251 | 504 | |||
252 | 505 | g_mutex_unlock (&extension->priv->property_lock); | ||
253 | 506 | |||
254 | 507 | g_object_notify (G_OBJECT (extension), "writable"); | ||
255 | 508 | } | ||
256 | 509 | |||
257 | 510 | /** | ||
258 | 511 | * e_source_ubuntu_get_metadata: | ||
259 | 512 | * @extension: an #ESourceUbuntu | ||
260 | 513 | * | ||
261 | 514 | * Returns the metadata string of the application associated | ||
262 | 515 | * with the #ESource to which @extension belongs. Can be %NULL or an empty | ||
263 | 516 | * string. | ||
264 | 517 | * | ||
265 | 518 | * Returns: the associated metadata | ||
266 | 519 | * | ||
267 | 520 | **/ | ||
268 | 521 | const gchar * | ||
269 | 522 | e_source_ubuntu_get_metadata (ESourceUbuntu *extension) | ||
270 | 523 | { | ||
271 | 524 | g_return_val_if_fail (E_IS_SOURCE_UBUNTU (extension), NULL); | ||
272 | 525 | |||
273 | 526 | return extension->priv->metadata; | ||
274 | 527 | } | ||
275 | 528 | |||
276 | 529 | /** | ||
277 | 530 | * e_source_ubuntu_dup_metadata: | ||
278 | 531 | * @extension: an #ESourceUbuntu | ||
279 | 532 | * | ||
280 | 533 | * Thread-safe variation of e_source_ubuntu_get_metadata(). | ||
281 | 534 | * Use this function when accessing @extension from multiple threads. | ||
282 | 535 | * | ||
283 | 536 | * The returned string should be freed with g_free() when no longer needed. | ||
284 | 537 | * | ||
285 | 538 | * Returns: a newly-allocated copy of #ESourceUbuntu:metadata | ||
286 | 539 | * | ||
287 | 540 | **/ | ||
288 | 541 | gchar * | ||
289 | 542 | e_source_ubuntu_dup_metadata (ESourceUbuntu *extension) | ||
290 | 543 | { | ||
291 | 544 | const gchar *metadata; | ||
292 | 545 | gchar *duplicate; | ||
293 | 546 | |||
294 | 547 | g_return_val_if_fail (E_IS_SOURCE_UBUNTU (extension), NULL); | ||
295 | 548 | |||
296 | 549 | g_mutex_lock (&extension->priv->property_lock); | ||
297 | 550 | |||
298 | 551 | metadata = e_source_ubuntu_get_metadata(extension); | ||
299 | 552 | duplicate = g_strdup (metadata); | ||
300 | 553 | |||
301 | 554 | g_mutex_unlock (&extension->priv->property_lock); | ||
302 | 555 | |||
303 | 556 | return duplicate; | ||
304 | 557 | } | ||
305 | 558 | |||
306 | 559 | /** | ||
307 | 560 | * e_source_ubuntu_set_metadata: | ||
308 | 561 | * @extension: an #ESourceUbuntu | ||
309 | 562 | * @metadata: (allow-none): the associated metadata, or %NULL | ||
310 | 563 | * | ||
311 | 564 | * Sets the metadata associated with the #ESource to which @extension belongs. | ||
312 | 565 | * | ||
313 | 566 | * The internal copy of @metadata is automatically stripped of leading | ||
314 | 567 | * and trailing whitespace. If the resulting string is empty, %NULL is set | ||
315 | 568 | * instead. | ||
316 | 569 | * | ||
317 | 570 | **/ | ||
318 | 571 | void | ||
319 | 572 | e_source_ubuntu_set_metadata (ESourceUbuntu *extension, | ||
320 | 573 | const gchar *metadata) | ||
321 | 574 | { | ||
322 | 575 | g_return_if_fail (E_IS_SOURCE_UBUNTU (extension)); | ||
323 | 576 | |||
324 | 577 | g_mutex_lock (&extension->priv->property_lock); | ||
325 | 578 | |||
326 | 579 | if (g_strcmp0 (extension->priv->metadata, metadata) == 0) { | ||
327 | 580 | g_mutex_unlock (&extension->priv->property_lock); | ||
328 | 581 | return; | ||
329 | 582 | } | ||
330 | 583 | |||
331 | 584 | g_free (extension->priv->metadata); | ||
332 | 585 | extension->priv->metadata = e_util_strdup_strip (metadata); | ||
333 | 586 | |||
334 | 587 | g_mutex_unlock (&extension->priv->property_lock); | ||
335 | 588 | |||
336 | 589 | g_object_notify (G_OBJECT (extension), "metadata"); | ||
337 | 590 | } | ||
338 | 411 | 591 | ||
339 | === modified file 'eds-extension/e-source-ubuntu.h' | |||
340 | --- eds-extension/e-source-ubuntu.h 2015-07-13 20:25:36 +0000 | |||
341 | +++ eds-extension/e-source-ubuntu.h 2016-07-11 14:39:54 +0000 | |||
342 | @@ -87,9 +87,18 @@ | |||
343 | 87 | void e_source_ubuntu_set_autoremove (ESourceUbuntu *extension, | 87 | void e_source_ubuntu_set_autoremove (ESourceUbuntu *extension, |
344 | 88 | gboolean flag); | 88 | gboolean flag); |
345 | 89 | 89 | ||
346 | 90 | gboolean e_source_ubuntu_get_writable (ESourceUbuntu *extension); | ||
347 | 91 | void e_source_ubuntu_set_writable (ESourceUbuntu *extension, | ||
348 | 92 | gboolean flag); | ||
349 | 93 | |||
350 | 90 | const gchar * e_source_ubuntu_get_account_provider(ESourceUbuntu *extension); | 94 | const gchar * e_source_ubuntu_get_account_provider(ESourceUbuntu *extension); |
351 | 91 | gchar * e_source_ubuntu_dup_account_provider(ESourceUbuntu *extension); | 95 | gchar * e_source_ubuntu_dup_account_provider(ESourceUbuntu *extension); |
352 | 92 | 96 | ||
353 | 97 | const gchar * e_source_ubuntu_get_metadata (ESourceUbuntu *extension); | ||
354 | 98 | gchar * e_source_ubuntu_dup_metadata (ESourceUbuntu *extension); | ||
355 | 99 | void e_source_ubuntu_set_metadata (ESourceUbuntu *extension, | ||
356 | 100 | const gchar *metadata); | ||
357 | 101 | |||
358 | 93 | G_END_DECLS | 102 | G_END_DECLS |
359 | 94 | 103 | ||
360 | 95 | #endif /* E_SOURCE_UBUNTU_H */ | 104 | #endif /* E_SOURCE_UBUNTU_H */ |
361 | 96 | 105 | ||
362 | === added file 'eds-extension/evolution-data-server-ubuntu.pc.in' | |||
363 | --- eds-extension/evolution-data-server-ubuntu.pc.in 1970-01-01 00:00:00 +0000 | |||
364 | +++ eds-extension/evolution-data-server-ubuntu.pc.in 2016-07-11 14:39:54 +0000 | |||
365 | @@ -0,0 +1,11 @@ | |||
366 | 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ | ||
367 | 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@/evolution-data-server-ubuntu/ | ||
368 | 3 | |||
369 | 4 | Name: evolution-data-server-ubuntu | ||
370 | 5 | Description: EDS extension used by Ubuntu apps | ||
371 | 6 | Version: 1.0 | ||
372 | 7 | Libs: -L${libdir} -lubuntu-source-eds | ||
373 | 8 | Cflags: -I${includedir} | ||
374 | 9 | Requires: libedataserver-1.2 | ||
375 | 10 | |||
376 | 11 | |||
377 | 0 | 12 | ||
378 | === modified file 'eds-extension/module-ubuntu-sources.c' | |||
379 | --- eds-extension/module-ubuntu-sources.c 2015-12-11 18:01:33 +0000 | |||
380 | +++ eds-extension/module-ubuntu-sources.c 2016-07-11 14:39:54 +0000 | |||
381 | @@ -128,6 +128,10 @@ | |||
382 | 128 | GSList *link; | 128 | GSList *link; |
383 | 129 | GQueue trash = G_QUEUE_INIT; | 129 | GQueue trash = G_QUEUE_INIT; |
384 | 130 | 130 | ||
385 | 131 | if (ag_account_id == 0) { | ||
386 | 132 | return; | ||
387 | 133 | } | ||
388 | 134 | |||
389 | 131 | server = ubuntu_sources_get_server (extension); | 135 | server = ubuntu_sources_get_server (extension); |
390 | 132 | 136 | ||
391 | 133 | eds_id_list = g_hash_table_lookup (extension->uoa_to_eds, | 137 | eds_id_list = g_hash_table_lookup (extension->uoa_to_eds, |
392 | @@ -166,19 +170,25 @@ | |||
393 | 166 | { | 170 | { |
394 | 167 | ESourceUbuntu *ubuntu_ext; | 171 | ESourceUbuntu *ubuntu_ext; |
395 | 168 | AgAccountId ag_account_id; | 172 | AgAccountId ag_account_id; |
397 | 169 | AgAccount *ag_account; | 173 | AgAccount *ag_account = NULL; |
398 | 170 | 174 | ||
399 | 171 | g_debug("Register new source: %s/%s", e_source_get_display_name(source), | 175 | g_debug("Register new source: %s/%s", e_source_get_display_name(source), |
400 | 172 | e_source_get_uid(source)); | 176 | e_source_get_uid(source)); |
401 | 173 | 177 | ||
402 | 174 | if (!e_source_has_extension (source, E_SOURCE_EXTENSION_UBUNTU)) { | 178 | if (!e_source_has_extension (source, E_SOURCE_EXTENSION_UBUNTU)) { |
403 | 179 | g_debug("\tSource does not have ubuntu extension!"); | ||
404 | 175 | return FALSE; | 180 | return FALSE; |
405 | 176 | } | 181 | } |
406 | 177 | 182 | ||
407 | 178 | ubuntu_ext = e_source_get_extension (source, E_SOURCE_EXTENSION_UBUNTU); | 183 | ubuntu_ext = e_source_get_extension (source, E_SOURCE_EXTENSION_UBUNTU); |
408 | 179 | ag_account_id = e_source_ubuntu_get_account_id (ubuntu_ext); | 184 | ag_account_id = e_source_ubuntu_get_account_id (ubuntu_ext); |
411 | 180 | ag_account = ag_manager_get_account (extension->ag_manager, | 185 | if (ag_account_id > 0) { |
412 | 181 | ag_account_id); | 186 | ag_account = ag_manager_get_account (extension->ag_manager, |
413 | 187 | ag_account_id); | ||
414 | 188 | } else { | ||
415 | 189 | // accept sources with empty account | ||
416 | 190 | return TRUE; | ||
417 | 191 | } | ||
418 | 182 | 192 | ||
419 | 183 | if (ag_account) { | 193 | if (ag_account) { |
420 | 184 | GSList *eds_id_list; | 194 | GSList *eds_id_list; |
421 | @@ -300,6 +310,9 @@ | |||
422 | 300 | { | 310 | { |
423 | 301 | g_debug("loading ubuntu sources"); | 311 | g_debug("loading ubuntu sources"); |
424 | 302 | 312 | ||
425 | 313 | if (extension->ag_manager != NULL) | ||
426 | 314 | return; | ||
427 | 315 | |||
428 | 303 | extension->ag_manager = ag_manager_new (); | 316 | extension->ag_manager = ag_manager_new (); |
429 | 304 | 317 | ||
430 | 305 | /* This populates a hash table of UOA ID -> ESource UID strings by | 318 | /* This populates a hash table of UOA ID -> ESource UID strings by |
431 | @@ -410,6 +423,7 @@ | |||
432 | 410 | static void | 423 | static void |
433 | 411 | e_ubuntu_sources_init (EUbuntuSources *extension) | 424 | e_ubuntu_sources_init (EUbuntuSources *extension) |
434 | 412 | { | 425 | { |
435 | 426 | extension->ag_manager = NULL; | ||
436 | 413 | extension->uoa_to_eds = g_hash_table_new_full ( | 427 | extension->uoa_to_eds = g_hash_table_new_full ( |
437 | 414 | (GHashFunc) g_direct_hash, | 428 | (GHashFunc) g_direct_hash, |
438 | 415 | (GEqualFunc) g_direct_equal, | 429 | (GEqualFunc) g_direct_equal, |
FAILED: Continuous integration, rev:212 /jenkins. canonical. com/system- apps/job/ lp-address- book-service- ci/1/ /jenkins. canonical. com/system- apps/job/ build/667 /jenkins. canonical. com/system- apps/job/ test-0- autopkgtest/ label=phone- armhf,release= vivid+overlay, testname= default/ 86 /jenkins. canonical. com/system- apps/job/ test-0- autopkgtest/ label=phone- armhf,release= xenial+ overlay, testname= default/ 86/console /jenkins. canonical. com/system- apps/job/ test-0- autopkgtest/ label=phone- armhf,release= yakkety, testname= default/ 86/console /jenkins. canonical. com/system- apps/job/ build-0- fetch/667 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= vivid+overlay/ 626 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= xenial+ overlay/ 626 /jenkins. canonical. com/system- apps/job/ build-1- sourcepkg/ release= yakkety/ 626 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 618 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 618/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 618 /jenkins. canonical. com/system- apps/job/ build-2-...
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/