Merge lp:~mardy/libaccounts-glib/packaging into lp:libaccounts-glib

Proposed by Alberto Mardegan
Status: Merged
Approved by: Ken VanDine
Approved revision: no longer in the source branch.
Merged at revision: 180
Proposed branch: lp:~mardy/libaccounts-glib/packaging
Merge into: lp:libaccounts-glib
Diff against target: 175 lines (+43/-31)
6 files modified
Makefile.am.coverage (+12/-2)
NEWS (+6/-0)
configure.ac (+1/-1)
debian/changelog (+8/-0)
libaccounts-glib/ag-manager.c (+2/-3)
tests/check_ag.c (+14/-25)
To merge this branch: bzr merge lp:~mardy/libaccounts-glib/packaging
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+193245@code.launchpad.net

Commit message

New upstream release

Fix SQL query for ag_manager_list_by_service_type()
Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=208

Description of the change

New upstream release

Fix SQL query for ag_manager_list_by_service_type()
Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=208

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) :
review: Approve
lp:~mardy/libaccounts-glib/packaging updated
180. By Alberto Mardegan

New upstream release

Fix SQL query for ag_manager_list_by_service_type()
Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=208
.

Approved by Ken VanDine, PS Jenkins bot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am.coverage'
2--- Makefile.am.coverage 2013-10-15 11:49:25 +0000
3+++ Makefile.am.coverage 2013-10-30 13:44:50 +0000
4@@ -1,8 +1,6 @@
5
6 # Coverage targets
7
8-if HAVE_GCOV
9-
10 .PHONY: clean-gcda
11 clean-gcda:
12 @echo Removing old coverage results
13@@ -13,6 +11,8 @@
14 -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
15 $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
16
17+if HAVE_GCOV
18+
19 generate-coverage-html:
20 @echo Collecting coverage data
21 $(AM_V_at)$(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
22@@ -24,4 +24,14 @@
23
24 clean-local: clean-coverage-html
25
26+else
27+
28+generate-coverage-html:
29+ $(AM_V_at)echo "Code coverage reporting not available"
30+
31+clean-coverage-html: clean-gcda
32+ -$(AM_V_at)rm -rf coverage.info coveragereport
33+
34+clean-local: clean-coverage-html
35+
36 endif # HAVE_GCOV
37
38=== modified file 'NEWS'
39--- NEWS 2013-10-15 13:35:53 +0000
40+++ NEWS 2013-10-30 13:44:50 +0000
41@@ -1,5 +1,11 @@
42 libaccounts-glib NEWS
43
44+Version 1.15
45+------------
46+
47+* Fix SQL query for ag_manager_list_by_service_type()
48+ Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=208
49+
50 Version 1.14
51 ------------
52
53
54=== modified file 'configure.ac'
55--- configure.ac 2013-10-15 13:35:53 +0000
56+++ configure.ac 2013-10-30 13:44:50 +0000
57@@ -1,7 +1,7 @@
58 dnl Process this file with autoconf to produce a configure script.
59 AC_PREREQ([2.64])
60 AC_INIT([libaccounts-glib],
61- [1.14],
62+ [1.15],
63 [http://code.google.com/p/accounts-sso/issues/entry],
64 [libaccounts-glib],
65 [http://code.google.com/p/accounts-sso/])
66
67=== modified file 'debian/changelog'
68--- debian/changelog 2013-10-16 14:15:26 +0000
69+++ debian/changelog 2013-10-30 13:44:50 +0000
70@@ -1,3 +1,11 @@
71+libaccounts-glib (1.15-0ubuntu1) UNRELEASED; urgency=low
72+
73+ * New upstream release
74+ - Fix SQL query for ag_manager_list_by_service_type()
75+ Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=208
76+
77+ -- Alberto Mardegan <alberto.mardegan@canonical.com> Wed, 30 Oct 2013 15:42:48 +0200
78+
79 libaccounts-glib (1.14+13.10.20131016.2-0ubuntu1) saucy; urgency=low
80
81 [ Alberto Mardegan ]
82
83=== modified file 'libaccounts-glib/ag-manager.c'
84--- libaccounts-glib/ag-manager.c 2013-10-03 13:44:27 +0000
85+++ libaccounts-glib/ag-manager.c 2013-10-30 13:44:50 +0000
86@@ -1699,9 +1699,8 @@
87
88 g_return_val_if_fail (AG_IS_MANAGER (manager), NULL);
89 sqlite3_snprintf (sizeof (sql), sql,
90- "SELECT DISTINCT account FROM Settings "
91- "JOIN Services ON Settings.service = Services.id "
92- "WHERE Services.type = %Q;",
93+ "SELECT id FROM Accounts WHERE provider IN ("
94+ "SELECT provider FROM Services WHERE type = %Q);",
95 service_type);
96 _ag_manager_exec_query (manager, (AgQueryCallback)add_id_to_list,
97 &list, sql);
98
99=== modified file 'tests/check_ag.c'
100--- tests/check_ag.c 2013-10-15 13:40:40 +0000
101+++ tests/check_ag.c 2013-10-30 13:44:50 +0000
102@@ -1843,6 +1843,8 @@
103 START_TEST(test_list)
104 {
105 const gchar *display_name = "New account";
106+ const gchar *provider_name = "other_provider";
107+ const gchar *my_service_name = "MyService";
108 const gchar *service_name = "OtherService";
109 const gchar *service_type;
110 GValue value = { 0 };
111@@ -1850,7 +1852,7 @@
112 GList *list;
113
114 manager = ag_manager_new ();
115- account = ag_manager_create_account (manager, PROVIDER);
116+ account = ag_manager_create_account (manager, provider_name);
117
118 ag_account_set_enabled (account, TRUE);
119 ag_account_set_display_name (account, display_name);
120@@ -1874,7 +1876,7 @@
121 NULL);
122 fail_unless (id_prop == account->id);
123 fail_unless (manager_prop == manager);
124- fail_unless (g_strcmp0 (provider_prop, PROVIDER) == 0);
125+ fail_unless (g_strcmp0 (provider_prop, provider_name) == 0);
126 g_object_unref (manager);
127 g_free (provider_prop);
128 }
129@@ -1886,36 +1888,23 @@
130 g_list_free (list);
131
132 /* check that it doesn't support the service type provided by MyService */
133- service = ag_manager_get_service (manager, service_name);
134+ service = ag_manager_get_service (manager, my_service_name);
135 service_type = ag_service_get_service_type (service);
136- fail_unless (service_type != NULL, "Service %s has no type", service_name);
137+ fail_unless (service_type != NULL,
138+ "Service %s has no type", my_service_name);
139
140 list = ag_manager_list_by_service_type (manager, service_type);
141 fail_unless (g_list_find (list, GUINT_TO_POINTER (account->id)) == NULL,
142 "New account supports %s service type, but shouldn't",
143 service_type);
144 g_list_free (list);
145-
146- /* Add the service to the account */
147- fail_unless (service != NULL);
148-
149- ag_account_select_service (account, service);
150- ag_account_set_enabled (account, TRUE);
151-
152- /* test getting default setting from template */
153- g_value_init (&value, G_TYPE_INT);
154- source = ag_account_get_value (account, "parameters/port", &value);
155- fail_unless (source == AG_SETTING_SOURCE_PROFILE,
156- "Cannot get port from profile");
157- fail_unless (g_value_get_int (&value) == 5223,
158- "Wrong port number: %d", g_value_get_int (&value));
159- g_value_unset (&value);
160-
161- ag_account_store (account, account_store_now_cb, TEST_STRING);
162- run_main_loop_for_n_seconds(0);
163- fail_unless (data_stored, "Callback not invoked immediately");
164-
165- /* check that the service is now there */
166+ ag_service_unref(service);
167+
168+ service = ag_manager_get_service (manager, service_name);
169+ service_type = ag_service_get_service_type (service);
170+ fail_unless (service_type != NULL,
171+ "Service %s has no type", service_name);
172+
173 list = ag_manager_list_by_service_type (manager, service_type);
174 fail_unless (g_list_find (list, GUINT_TO_POINTER (account->id)) != NULL,
175 "New account doesn't supports %s service type, but should",

Subscribers

People subscribed via source and target branches

to all changes: