Merge lp:~mardy/ubuntu-system-settings-online-accounts/lp1454210 into lp:ubuntu-system-settings-online-accounts

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: 274
Merged at revision: 288
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/lp1454210
Merge into: lp:ubuntu-system-settings-online-accounts
Diff against target: 52 lines (+13/-3)
3 files modified
click-hooks/main.cpp (+3/-2)
debian/changelog (+6/-0)
tests/click-hooks/tst_online_accounts_hooks.cpp (+4/-1)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/lp1454210
Reviewer Review Type Date Requested Status
David Barth (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+262321@code.launchpad.net

Commit message

Make sure that accounts are not removed on app updates

When looking for the original hook files, strip out the version number and instead match solely on the short app ID. This will prevent removing accounts when the old hook files have been removed, but a new version is available.

Description of the change

Make sure that accounts are not removed on app updates

When looking for the original hook files, strip out the version number and instead match solely on the short app ID. This will prevent removing accounts when the old hook files have been removed, but a new version is available.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
273. By Alberto Mardegan

from trunk

[ Andreas Pokorny ]
* rebuild for libmirclient9 part of mir release 0.14.0 - removes
  architecture restrictions imposed by previous mir releases.
[ CI Train Bot ]
* Resync trunk. added: po/cy.po
[ Alberto Mardegan ]
* Inject the APP_ID into the child process's environment. (LP:
  #1468792)
[ CI Train Bot ]
* New rebuild forced.
* Resync trunk.
[ Alberto Mardegan ]
* Fix build with Qt 5.5 (LP: #1387537, #1421009, #1448878, #1447175)
* Return the error name to the client (LP: #1441873)
[ CI Train Bot ]
* New rebuild forced.

274. By Alberto Mardegan

sync with archive

No-change test rebuild for g++5 ABI transition

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Barth (dbarth) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'click-hooks/main.cpp'
2--- click-hooks/main.cpp 2015-01-22 10:22:56 +0000
3+++ click-hooks/main.cpp 2015-08-04 09:05:17 +0000
4@@ -257,8 +257,9 @@
5 /* Check that the hook file is still there; if it isn't, then it
6 * means that the click package was removed, and we must remove our
7 * copy as well. */
8- QString hookFileName = profile + "." + fileType;
9- if (hooksDirIn.exists(hookFileName)) continue;
10+ QString hookFileName = stripVersion(profile) + "_*." + fileType;
11+ QStringList nameFilters = QStringList() << hookFileName;
12+ if (!hooksDirIn.entryList(nameFilters).isEmpty()) continue;
13
14 QFile::remove(fileInfo.filePath());
15 /* If this is a provider, we must also remove any accounts
16
17=== modified file 'debian/changelog'
18--- debian/changelog 2015-07-16 18:35:02 +0000
19+++ debian/changelog 2015-08-04 09:05:17 +0000
20@@ -1,3 +1,9 @@
21+ubuntu-system-settings-online-accounts (0.6+15.10.20150716-0ubuntu2~gcc5.1) wily; urgency=medium
22+
23+ * No-change test rebuild for g++5 ABI transition
24+
25+ -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 17 Jul 2015 22:43:27 +0000
26+
27 ubuntu-system-settings-online-accounts (0.6+15.10.20150716-0ubuntu1) wily; urgency=medium
28
29 [ Andreas Pokorny ]
30
31=== modified file 'tests/click-hooks/tst_online_accounts_hooks.cpp'
32--- tests/click-hooks/tst_online_accounts_hooks.cpp 2015-01-22 10:22:56 +0000
33+++ tests/click-hooks/tst_online_accounts_hooks.cpp 2015-08-04 09:05:17 +0000
34@@ -398,7 +398,9 @@
35 "</provider>");
36 QVERIFY(m_installDir.exists(stillInstalled));
37
38- writeHookFile("com-ubuntu.test_StillInstalled_2.0.provider",
39+ /* Write a newer version of the hook, to make sure that accounts created
40+ * with older versions of the app are preserved */
41+ writeHookFile("com-ubuntu.test_StillInstalled_3.0.provider",
42 "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
43 "<provider>\n"
44 "</provider>");
45@@ -471,6 +473,7 @@
46
47 /* Now remove the hook file and write a newer version of it */
48 clearHooksDir();
49+ QTest::qWait(1500); // make sure that the timestamp is newer
50 writeHookFile("com-ubuntu.test_MyApp_1.1.application",
51 "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
52 "<application>\n"

Subscribers

People subscribed via source and target branches