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
=== modified file 'Makefile.am.coverage'
--- Makefile.am.coverage 2013-10-15 11:49:25 +0000
+++ Makefile.am.coverage 2013-10-30 13:44:50 +0000
@@ -1,8 +1,6 @@
11
2# Coverage targets2# Coverage targets
33
4if HAVE_GCOV
5
6.PHONY: clean-gcda4.PHONY: clean-gcda
7clean-gcda:5clean-gcda:
8 @echo Removing old coverage results6 @echo Removing old coverage results
@@ -13,6 +11,8 @@
13 -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check11 -$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check
14 $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) generate-coverage-html12 $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) generate-coverage-html
1513
14if HAVE_GCOV
15
16generate-coverage-html:16generate-coverage-html:
17 @echo Collecting coverage data17 @echo Collecting coverage data
18 $(AM_V_at)$(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool18 $(AM_V_at)$(LCOV) --directory $(top_builddir) --capture --output-file coverage.info --no-checksum --compat-libtool
@@ -24,4 +24,14 @@
2424
25clean-local: clean-coverage-html25clean-local: clean-coverage-html
2626
27else
28
29generate-coverage-html:
30 $(AM_V_at)echo "Code coverage reporting not available"
31
32clean-coverage-html: clean-gcda
33 -$(AM_V_at)rm -rf coverage.info coveragereport
34
35clean-local: clean-coverage-html
36
27endif # HAVE_GCOV37endif # HAVE_GCOV
2838
=== modified file 'NEWS'
--- NEWS 2013-10-15 13:35:53 +0000
+++ NEWS 2013-10-30 13:44:50 +0000
@@ -1,5 +1,11 @@
1libaccounts-glib NEWS1libaccounts-glib NEWS
22
3Version 1.15
4------------
5
6* Fix SQL query for ag_manager_list_by_service_type()
7 Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=208
8
3Version 1.149Version 1.14
4------------10------------
511
612
=== modified file 'configure.ac'
--- configure.ac 2013-10-15 13:35:53 +0000
+++ configure.ac 2013-10-30 13:44:50 +0000
@@ -1,7 +1,7 @@
1dnl Process this file with autoconf to produce a configure script.1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ([2.64])2AC_PREREQ([2.64])
3AC_INIT([libaccounts-glib],3AC_INIT([libaccounts-glib],
4 [1.14],4 [1.15],
5 [http://code.google.com/p/accounts-sso/issues/entry],5 [http://code.google.com/p/accounts-sso/issues/entry],
6 [libaccounts-glib],6 [libaccounts-glib],
7 [http://code.google.com/p/accounts-sso/])7 [http://code.google.com/p/accounts-sso/])
88
=== modified file 'debian/changelog'
--- debian/changelog 2013-10-16 14:15:26 +0000
+++ debian/changelog 2013-10-30 13:44:50 +0000
@@ -1,3 +1,11 @@
1libaccounts-glib (1.15-0ubuntu1) UNRELEASED; urgency=low
2
3 * New upstream release
4 - Fix SQL query for ag_manager_list_by_service_type()
5 Fixes: http://code.google.com/p/accounts-sso/issues/detail?id=208
6
7 -- Alberto Mardegan <alberto.mardegan@canonical.com> Wed, 30 Oct 2013 15:42:48 +0200
8
1libaccounts-glib (1.14+13.10.20131016.2-0ubuntu1) saucy; urgency=low9libaccounts-glib (1.14+13.10.20131016.2-0ubuntu1) saucy; urgency=low
210
3 [ Alberto Mardegan ]11 [ Alberto Mardegan ]
412
=== modified file 'libaccounts-glib/ag-manager.c'
--- libaccounts-glib/ag-manager.c 2013-10-03 13:44:27 +0000
+++ libaccounts-glib/ag-manager.c 2013-10-30 13:44:50 +0000
@@ -1699,9 +1699,8 @@
16991699
1700 g_return_val_if_fail (AG_IS_MANAGER (manager), NULL);1700 g_return_val_if_fail (AG_IS_MANAGER (manager), NULL);
1701 sqlite3_snprintf (sizeof (sql), sql,1701 sqlite3_snprintf (sizeof (sql), sql,
1702 "SELECT DISTINCT account FROM Settings "1702 "SELECT id FROM Accounts WHERE provider IN ("
1703 "JOIN Services ON Settings.service = Services.id "1703 "SELECT provider FROM Services WHERE type = %Q);",
1704 "WHERE Services.type = %Q;",
1705 service_type);1704 service_type);
1706 _ag_manager_exec_query (manager, (AgQueryCallback)add_id_to_list,1705 _ag_manager_exec_query (manager, (AgQueryCallback)add_id_to_list,
1707 &list, sql);1706 &list, sql);
17081707
=== modified file 'tests/check_ag.c'
--- tests/check_ag.c 2013-10-15 13:40:40 +0000
+++ tests/check_ag.c 2013-10-30 13:44:50 +0000
@@ -1843,6 +1843,8 @@
1843START_TEST(test_list)1843START_TEST(test_list)
1844{1844{
1845 const gchar *display_name = "New account";1845 const gchar *display_name = "New account";
1846 const gchar *provider_name = "other_provider";
1847 const gchar *my_service_name = "MyService";
1846 const gchar *service_name = "OtherService";1848 const gchar *service_name = "OtherService";
1847 const gchar *service_type;1849 const gchar *service_type;
1848 GValue value = { 0 };1850 GValue value = { 0 };
@@ -1850,7 +1852,7 @@
1850 GList *list;1852 GList *list;
18511853
1852 manager = ag_manager_new ();1854 manager = ag_manager_new ();
1853 account = ag_manager_create_account (manager, PROVIDER);1855 account = ag_manager_create_account (manager, provider_name);
18541856
1855 ag_account_set_enabled (account, TRUE);1857 ag_account_set_enabled (account, TRUE);
1856 ag_account_set_display_name (account, display_name);1858 ag_account_set_display_name (account, display_name);
@@ -1874,7 +1876,7 @@
1874 NULL);1876 NULL);
1875 fail_unless (id_prop == account->id);1877 fail_unless (id_prop == account->id);
1876 fail_unless (manager_prop == manager);1878 fail_unless (manager_prop == manager);
1877 fail_unless (g_strcmp0 (provider_prop, PROVIDER) == 0);1879 fail_unless (g_strcmp0 (provider_prop, provider_name) == 0);
1878 g_object_unref (manager);1880 g_object_unref (manager);
1879 g_free (provider_prop);1881 g_free (provider_prop);
1880 }1882 }
@@ -1886,36 +1888,23 @@
1886 g_list_free (list);1888 g_list_free (list);
18871889
1888 /* check that it doesn't support the service type provided by MyService */1890 /* check that it doesn't support the service type provided by MyService */
1889 service = ag_manager_get_service (manager, service_name);1891 service = ag_manager_get_service (manager, my_service_name);
1890 service_type = ag_service_get_service_type (service);1892 service_type = ag_service_get_service_type (service);
1891 fail_unless (service_type != NULL, "Service %s has no type", service_name);1893 fail_unless (service_type != NULL,
1894 "Service %s has no type", my_service_name);
18921895
1893 list = ag_manager_list_by_service_type (manager, service_type);1896 list = ag_manager_list_by_service_type (manager, service_type);
1894 fail_unless (g_list_find (list, GUINT_TO_POINTER (account->id)) == NULL,1897 fail_unless (g_list_find (list, GUINT_TO_POINTER (account->id)) == NULL,
1895 "New account supports %s service type, but shouldn't",1898 "New account supports %s service type, but shouldn't",
1896 service_type);1899 service_type);
1897 g_list_free (list);1900 g_list_free (list);
18981901 ag_service_unref(service);
1899 /* Add the service to the account */1902
1900 fail_unless (service != NULL);1903 service = ag_manager_get_service (manager, service_name);
19011904 service_type = ag_service_get_service_type (service);
1902 ag_account_select_service (account, service);1905 fail_unless (service_type != NULL,
1903 ag_account_set_enabled (account, TRUE);1906 "Service %s has no type", service_name);
19041907
1905 /* test getting default setting from template */
1906 g_value_init (&value, G_TYPE_INT);
1907 source = ag_account_get_value (account, "parameters/port", &value);
1908 fail_unless (source == AG_SETTING_SOURCE_PROFILE,
1909 "Cannot get port from profile");
1910 fail_unless (g_value_get_int (&value) == 5223,
1911 "Wrong port number: %d", g_value_get_int (&value));
1912 g_value_unset (&value);
1913
1914 ag_account_store (account, account_store_now_cb, TEST_STRING);
1915 run_main_loop_for_n_seconds(0);
1916 fail_unless (data_stored, "Callback not invoked immediately");
1917
1918 /* check that the service is now there */
1919 list = ag_manager_list_by_service_type (manager, service_type);1908 list = ag_manager_list_by_service_type (manager, service_type);
1920 fail_unless (g_list_find (list, GUINT_TO_POINTER (account->id)) != NULL,1909 fail_unless (g_list_find (list, GUINT_TO_POINTER (account->id)) != NULL,
1921 "New account doesn't supports %s service type, but should",1910 "New account doesn't supports %s service type, but should",

Subscribers

People subscribed via source and target branches

to all changes: