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

Proposed by Kai Mast
Status: Work in progress
Proposed branch: lp:~kai-mast/friends/upstart
Merge into: lp:friends
Diff against target: 75 lines (+10/-6)
6 files modified
data/friends.conf (+5/-0)
debian/control (+1/-1)
debian/friends.install (+1/-0)
service/Makefile.am (+0/-4)
service/src/service.vala (+1/-1)
setup.py (+2/-0)
To merge this branch: bzr merge lp:~kai-mast/friends/upstart
Reviewer Review Type Date Requested Status
Robert Bruce Park Needs Resubmitting
Review via email: mp+198999@code.launchpad.net

Description of the change

Added an upstart script to friends. This will start the service on session start.

I also fixed some warnings in the build process.

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

Try removing the makefile

254. By Kai Mast

Removed makefile.am

255. By Kai Mast

Deleted the correct file now

256. By Kai Mast

Fixed makefile.am

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

Sorry I screwed up the diff a little. Accidentally removed makefile.am instead of Makefile.

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

What's with the change to service.vala?

I think I'd like to see this resubmitted without any changes made under service/

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

There was a warning that a value was assigned and never used.

But maybe you're right and this should be done in a separate branch (there are many warnings when compiling the vala stuff).

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

Maybe this has changed recently but the last time I tried to fix that
warning, it just threw up another warning that we were ignoring the
return value from that function. Did you not see that warning when you
made that change? It's kind of a no-win situation and it's irrelevant
to the real change you want to make here.

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

Guess your right.

Btw, what is friends-dispatcher for. Is it enough to just start friends-service? Seems like friends-dispatcher gets started by friends-service after some time.

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

friends-dispatcher is the part that does all the work! ;-)

friends-service is just a simple timer that exists to invoke friends-dispatcher periodically. It used to be that friends-dispatcher was a long-running python process, but it was discovered that python's GObject implementation has incredibly poor memory usage characteristics compared to Vala, so in order to save memory we changed it so that there was a bare-minimum vala daemon that stays in memory and just invokes the python dispatcher to do all the work periodically, then exit.

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

So it does nothing else than executing friends-service every few minutes? Maybe it would make more sense to also use upstart for that then..

Upstart can also activate services via d-bus besides time-based events. Maybe that would make sense in this case.

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

Yeah, we thought of that, but unfortunately the -service also has to keep the data model in memory in order for things like the Friends Scope to be able to access that information on demand, and that's not something that upstart is capable of doing.

Unmerged revisions

256. By Kai Mast

Fixed makefile.am

255. By Kai Mast

Deleted the correct file now

254. By Kai Mast

Removed makefile.am

253. By Kai Mast

Try removing the makefile

252. By Kai Mast

Removed unneeded return value

251. By Kai Mast

* Fixed friends.install
* Removed linking to pthread

250. By Kai Mast

Now installing in the correct directory

249. By Kai Mast

First attempt to use upstart

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-13 20:53:24 +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-13 20:53:24 +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-13 20:53:24 +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=== added file 'service/Makefile.am'
34--- service/Makefile.am 1970-01-01 00:00:00 +0000
35+++ service/Makefile.am 2013-12-13 20:53:24 +0000
36@@ -0,0 +1,4 @@
37+SUBDIRS = src data
38+
39+dist_noinst_SCRIPTS = \
40+ autogen.sh
41
42=== removed file 'service/Makefile.am'
43--- service/Makefile.am 2013-02-04 19:42:37 +0000
44+++ service/Makefile.am 1970-01-01 00:00:00 +0000
45@@ -1,4 +0,0 @@
46-SUBDIRS = src data
47-
48-dist_noinst_SCRIPTS = \
49- autogen.sh
50
51=== modified file 'service/src/service.vala'
52--- service/src/service.vala 2013-11-05 18:51:48 +0000
53+++ service/src/service.vala 2013-12-13 20:53:24 +0000
54@@ -183,7 +183,7 @@
55 try {
56 dispatcher = Bus.get_proxy.end(res);
57 // Timeout.add_seconds (120, fetch_contacts); // LP#1214639
58- var ret = on_refresh ();
59+ on_refresh ();
60 } catch (IOError e) {
61 warning (e.message);
62 }
63
64=== modified file 'setup.py'
65--- setup.py 2013-04-04 22:57:10 +0000
66+++ setup.py 2013-12-13 20:53:24 +0000
67@@ -36,6 +36,8 @@
68 ['data/com.canonical.friends.gschema.xml']),
69 ('/usr/share/friends',
70 ['data/model-schema.csv']),
71+ ('/usr/share/upstart/sessions',
72+ ['data/friends.conf'])
73 ],
74 entry_points = {
75 'console_scripts': ['friends-dispatcher = friends.main:main'],

Subscribers

People subscribed via source and target branches

to all changes: