Merge lp:~kai-mast/friends/upstart2 into lp:friends

Proposed by Kai Mast
Status: Rejected
Rejected by: Robert Bruce Park
Proposed branch: lp:~kai-mast/friends/upstart2
Merge into: lp:friends
Diff against target: 44 lines (+9/-1)
4 files modified
data/friends.conf (+5/-0)
debian/control (+1/-1)
debian/friends.install (+1/-0)
setup.py (+2/-0)
To merge this branch: bzr merge lp:~kai-mast/friends/upstart2
Reviewer Review Type Date Requested Status
Robert Bruce Park Disapprove
Ken VanDine Needs Fixing
Review via email: mp+199361@code.launchpad.net

Description of the change

Cleaned up the upstart changes.

Btw, how is the service currently started? Friends-app does it somehow. Is it done in the QML components? Is this even allowed when an app is confined?
This should not be needed anymore now. If it still needed for some reason the app should call "start friends", so it is tracked by upstart.

To post a comment you must log in.
lp:~kai-mast/friends/upstart2 updated
250. By Kai Mast

converted tabs to spaces

Revision history for this message
Robert Bruce Park (robru) wrote :

Looks good to me, but I want to get ken's input on this.

review: Approve
Revision history for this message
Kai Mast (kai-mast) wrote :

Another thing is, this means that friends starts on session start. I really like this behaviour, so I get notifications instantly and don't have to start the app.
However, some people may not like this. So, maybe we should introduce a setting that changes this behaviour.

Revision history for this message
Kai Mast (kai-mast) wrote :

One more thing :D We could also do logging via upstart. Basically friends just has to output to stdout/stderr and everything will end up in ~/.cache/upstart/friends.log

Maybe this could eliminate some logging code.

Revision history for this message
Robert Bruce Park (robru) wrote :

Reducing the amount of logging code sounds nice, but i'm not sure how much we'd really save. Changing all the "log.info" calls to print statements would be pointless, but I guess there's a couple lines to save by dropping the logfile and logging to stdout only. Submit a branch ;-)

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

I don't think we should automatically start the service unconditionally. For example if there are no accounts configured, it would add startup overhead when the session starts for no benefit. Maybe use the dconf bridge and start if a key is set to true. We can default to false, and let users enable it.

review: Needs Fixing
Revision history for this message
Robert Bruce Park (robru) wrote :

Ken, the problem with not autostarting is that dbus activation is resulting in the service activating at unfortunate times. Popey filed a bug in which apparently the video player has some kind of social integration, so after booting, the first time you try to watch a video, instead you're bombarded with friends' notifications. it's probably better to bombard with notifications at startup than at video-play time ;-)

Revision history for this message
Kai Mast (kai-mast) wrote :

Maybe we could start some small script at bootup that checks if a social media account is set up. If yes it emits a signal to start friends?

I need to investigate if this is possible with upstart.

Revision history for this message
Robert Bruce Park (robru) wrote :

Such a script should be relatively trivial. Just write it in a language with gobject support (eg, python, not bash) and then you can easily check for which accounts are present. launching friends is even easier, just call it's dbus Refresh method and dbus will launch it for us.

Then just change your upstart script to run this new script instead of friends itself.

Revision history for this message
Robert Bruce Park (robru) wrote :

Rejecting because Friends is disaled, sorry.

review: Disapprove

Unmerged revisions

250. By Kai Mast

converted tabs to spaces

249. By Kai Mast

Cleaned up upstart changes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'data/friends.conf'
2--- data/friends.conf 1970-01-01 00:00:00 +0000
3+++ data/friends.conf 2013-12-17 21:53:44 +0000
4@@ -0,0 +1,5 @@
5+start on desktop-start
6+stop on desktop-end
7+
8+exec friends-service
9+
10
11=== modified file 'debian/control'
12--- debian/control 2013-11-07 14:54:31 +0000
13+++ debian/control 2013-12-17 21:53:44 +0000
14@@ -32,7 +32,7 @@
15 valac,
16 libdee-dev,
17 dh-autoreconf,
18-Standards-Version: 3.9.3
19+Standards-Version: 3.9.4
20 Homepage: https://launchpad.net/friends
21 # If you aren't a member of ~super-friends but need to upload packaging changes,
22 # just go ahead. ~super-friends will notice and sync up the code again.
23
24=== modified file 'debian/friends.install'
25--- debian/friends.install 2013-04-04 22:57:10 +0000
26+++ debian/friends.install 2013-12-17 21:53:44 +0000
27@@ -2,3 +2,4 @@
28 usr/share/dbus-1/services/com.canonical.Friends.Service.service
29 usr/share/friends/model-schema.csv
30 usr/share/glib-2.0/schemas/com.canonical.friends.gschema.xml
31+usr/share/upstart/sessions/friends.conf
32
33=== modified file 'setup.py'
34--- setup.py 2013-04-04 22:57:10 +0000
35+++ setup.py 2013-12-17 21:53:44 +0000
36@@ -36,6 +36,8 @@
37 ['data/com.canonical.friends.gschema.xml']),
38 ('/usr/share/friends',
39 ['data/model-schema.csv']),
40+ ('/usr/share/upstart/sessions',
41+ ['data/friends.conf'])
42 ],
43 entry_points = {
44 'console_scripts': ['friends-dispatcher = friends.main:main'],

Subscribers

People subscribed via source and target branches

to all changes: