Merge lp:~ken-vandine/content-hub/lp1324969 into lp:content-hub

Proposed by Ken VanDine
Status: Merged
Approved by: Michael Sheldon
Approved revision: 104
Merged at revision: 106
Proposed branch: lp:~ken-vandine/content-hub/lp1324969
Merge into: lp:content-hub
Diff against target: 107 lines (+32/-3)
7 files modified
debian/content-hub.install (+1/-1)
src/com/ubuntu/content/service/CMakeLists.txt (+10/-0)
src/com/ubuntu/content/service/content-hub-peer-hook-wrapper.in (+8/-0)
src/com/ubuntu/content/service/content-hub.hook.in (+1/-1)
src/com/ubuntu/content/service/hook.cpp (+7/-0)
src/com/ubuntu/content/service/hook.h (+1/-0)
src/com/ubuntu/content/service/registry.cpp (+4/-1)
To merge this branch: bzr merge lp:~ken-vandine/content-hub/lp1324969
Reviewer Review Type Date Requested Status
Michael Sheldon (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+221776@code.launchpad.net

Commit message

Add a wrapper for the click hook to ensure the dbus session is properly
exported (LP: #1324969)

Description of the change

Add a wrapper for the click hook to ensure the dbus session is properly
exported (LP: #1324969)

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/content-hub) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed the packaging (debian), did you subscribe a core-dev to this MP?

 * No change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
104. By Ken VanDine

ensure we delete the Hook and Registry to make sure the QGSettings destructor
gets called.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

I'm testing by bumping the version of hub-importer and reinstalling multiple times. It seems to work correctly if content-hub-service isn't running when it's installed, however if content-hub-service is running the click is installed the importer old version gets removed from gsettings but the new version isn't added.

review: Needs Fixing
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Sorry, that should read:

however if content-hub-service is running when the click is installed, the old version gets removed from gsettings but the new version isn't added.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

> Sorry, that should read:
>
> however if content-hub-service is running when the click is installed, the old
> version gets removed from gsettings but the new version isn't added.

That's a bug in gsettings-qt, it wasn't calling g_settings_sync in the destructor. Fixed in https://code.launchpad.net/~larsu/gsettings-qt/sync-on-destroy/+merge/221895

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?

 * Yes (except for occasional failure due to QGSettings bug)

Did CI run pass? If not, please explain why.

 * Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?

 * Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/content-hub.install'
--- debian/content-hub.install 2014-03-07 19:28:54 +0000
+++ debian/content-hub.install 2014-06-03 14:07:13 +0000
@@ -1,5 +1,5 @@
1usr/bin1usr/bin
2usr/lib/*/content-hub/content-hub-peer-hook2usr/lib/*/content-hub
3usr/share/click/hooks3usr/share/click/hooks
4usr/share/dbus-14usr/share/dbus-1
5usr/share/glib-2.0/schemas5usr/share/glib-2.0/schemas
66
=== modified file 'src/com/ubuntu/content/service/CMakeLists.txt'
--- src/com/ubuntu/content/service/CMakeLists.txt 2014-03-07 21:07:27 +0000
+++ src/com/ubuntu/content/service/CMakeLists.txt 2014-06-03 14:07:13 +0000
@@ -80,6 +80,16 @@
80 ${UPSTART_LAUNCH_LDFLAGS}80 ${UPSTART_LAUNCH_LDFLAGS}
81)81)
8282
83configure_file("content-hub-peer-hook-wrapper.in"
84 "content-hub-peer-hook-wrapper"
85 @ONLY
86)
87
88install(
89 PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/content-hub-peer-hook-wrapper"
90 DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/content-hub"
91)
92
83install(93install(
84 TARGETS content-hub-peer-hook94 TARGETS content-hub-peer-hook
85 RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/content-hub"95 RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/content-hub"
8696
=== added file 'src/com/ubuntu/content/service/content-hub-peer-hook-wrapper.in'
--- src/com/ubuntu/content/service/content-hub-peer-hook-wrapper.in 1970-01-01 00:00:00 +0000
+++ src/com/ubuntu/content/service/content-hub-peer-hook-wrapper.in 2014-06-03 14:07:13 +0000
@@ -0,0 +1,8 @@
1#!/bin/sh
2
3if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
4 [ -e $HOME/.cache/upstart/dbus-session ] && . $HOME/.cache/upstart/dbus-session || eval `dbus-launch --sh-syntax`
5 [ -n "$DBUS_SESSION_BUS_ADDRESS" ] && export DBUS_SESSION_BUS_ADDRESS
6fi
7
8@pkglibexecdir@/content-hub/content-hub-peer-hook
09
=== modified file 'src/com/ubuntu/content/service/content-hub.hook.in'
--- src/com/ubuntu/content/service/content-hub.hook.in 2013-09-23 20:55:01 +0000
+++ src/com/ubuntu/content/service/content-hub.hook.in 2014-06-03 14:07:13 +0000
@@ -1,4 +1,4 @@
1Pattern: ${home}/.local/share/content-hub/${id}1Pattern: ${home}/.local/share/content-hub/${id}
2Exec: @pkglibexecdir@/content-hub/content-hub-peer-hook2Exec: @pkglibexecdir@/content-hub/content-hub-peer-hook-wrapper
3User-Level: yes3User-Level: yes
4Hook-Name: content-hub4Hook-Name: content-hub
55
=== modified file 'src/com/ubuntu/content/service/hook.cpp'
--- src/com/ubuntu/content/service/hook.cpp 2014-03-04 21:47:48 +0000
+++ src/com/ubuntu/content/service/hook.cpp 2014-06-03 14:07:13 +0000
@@ -43,6 +43,12 @@
43{43{
44}44}
4545
46cucd::Hook::~Hook()
47{
48 TRACE() << Q_FUNC_INFO;
49 delete registry;
50}
51
46void cucd::Hook::run()52void cucd::Hook::run()
47{53{
48 TRACE() << Q_FUNC_INFO;54 TRACE() << Q_FUNC_INFO;
@@ -85,6 +91,7 @@
85 Q_FOREACH(QFileInfo f, contentDir.entryInfoList(QDir::Files))91 Q_FOREACH(QFileInfo f, contentDir.entryInfoList(QDir::Files))
86 add_peer(f);92 add_peer(f);
8793
94 deleteLater();
88 QCoreApplication::instance()->quit();95 QCoreApplication::instance()->quit();
89}96}
9097
9198
=== modified file 'src/com/ubuntu/content/service/hook.h'
--- src/com/ubuntu/content/service/hook.h 2014-02-20 21:18:27 +0000
+++ src/com/ubuntu/content/service/hook.h 2014-06-03 14:07:13 +0000
@@ -39,6 +39,7 @@
39public:39public:
40 explicit Hook(QObject *parent = 0);40 explicit Hook(QObject *parent = 0);
41 Hook(com::ubuntu::content::detail::PeerRegistry *registry, QObject *parent = 0);41 Hook(com::ubuntu::content::detail::PeerRegistry *registry, QObject *parent = 0);
42 ~Hook();
4243
43public slots:44public slots:
44 bool return_error(QString err = "");45 bool return_error(QString err = "");
4546
=== modified file 'src/com/ubuntu/content/service/registry.cpp'
--- src/com/ubuntu/content/service/registry.cpp 2014-04-02 14:46:23 +0000
+++ src/com/ubuntu/content/service/registry.cpp 2014-06-03 14:07:13 +0000
@@ -71,7 +71,10 @@
71 }71 }
72}72}
7373
74Registry::~Registry() {}74Registry::~Registry()
75{
76 TRACE() << Q_FUNC_INFO;
77}
7578
76cuc::Peer Registry::default_source_for_type(cuc::Type type)79cuc::Peer Registry::default_source_for_type(cuc::Type type)
77{80{

Subscribers

People subscribed via source and target branches