Merge lp:~ted/ubuntu-system-settings/dev-mode-env into lp:ubuntu-system-settings

Proposed by Ted Gould
Status: Needs review
Proposed branch: lp:~ted/ubuntu-system-settings/dev-mode-env
Merge into: lp:ubuntu-system-settings
Diff against target: 40 lines (+16/-0)
3 files modified
debian/developer-mode-settings.conf (+13/-0)
debian/rules (+2/-0)
debian/ubuntu-system-settings.install (+1/-0)
To merge this branch: bzr merge lp:~ted/ubuntu-system-settings/dev-mode-env
Reviewer Review Type Date Requested Status
Sebastien Bacher (community) Disapprove
PS Jenkins bot continuous-integration Approve
Review via email: mp+247473@code.launchpad.net

Commit message

Adding Upstart job to set debuging environment in developer mode

Description of the change

Small upstart job to set global environment variables in Qt and GLib for debug messages

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
Sebastien Bacher (seb128) wrote :

Thanks, but that job seems like something that should come with the session/touch init scripts, not with settings, it doesn't have much to do with the settings gui

review: Disapprove
Revision history for this message
Ted Gould (ted) wrote :

On Mon, 2015-01-26 at 09:15 +0000, Sebastien Bacher wrote:

> Thanks, but that job seems like something that should come with the
> session/touch init scripts, not with settings, it doesn't have much to
> do with the settings gui

I thought it should go with settings because that's where the setting
for how to configure developer mode is. So if we were to change how
developer mode is configured (I imagine we will at some point) that
could be handled all in the same package. The Upstart job just needs to
match the setting that the UI sets.

Unmerged revisions

1271. By Ted Gould

Attaching bug

1270. By Ted Gould

Make the directory as well

1269. By Ted Gould

Putting the config file in a package

1268. By Ted Gould

Adding an upstart job to use the developer mode setting for logging

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/developer-mode-settings.conf'
2--- debian/developer-mode-settings.conf 1970-01-01 00:00:00 +0000
3+++ debian/developer-mode-settings.conf 2015-01-23 19:52:01 +0000
4@@ -0,0 +1,13 @@
5+
6+start on starting dbus
7+
8+script
9+ DEVELOPER_MODE=`gdbus call --system --dest com.canonical.PropertyService --object-path /com/canonical/PropertyService --method com.canonical.PropertyService.GetProperty adb`
10+ if [ "$DEVELOPER_MODE" = "(true,)" ] ; then
11+ initctl set-env --global "G_MESSAGES_DEBUG=all"
12+ initctl set-env --global "QT_LOGGING_RULES=*.debug=true"
13+ else
14+ initctl set-env --global "G_MESSAGES_DEBUG="
15+ initctl set-env --global "QT_LOGGING_RULES=*.debug=false"
16+ fi
17+end script
18
19=== modified file 'debian/rules'
20--- debian/rules 2014-11-10 16:39:17 +0000
21+++ debian/rules 2015-01-23 19:52:01 +0000
22@@ -22,6 +22,8 @@
23 $$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
24 done; \
25 cd $(CURDIR)
26+ mkdir -p debian/tmp/usr/share/upstart/sessions
27+ install -m 0644 debian/developer-mode-settings.conf debian/tmp/usr/share/upstart/sessions
28 dh_install -X'*.pyc' --fail-missing
29
30 override_dh_makeshlibs:
31
32=== modified file 'debian/ubuntu-system-settings.install'
33--- debian/ubuntu-system-settings.install 2014-08-05 08:21:05 +0000
34+++ debian/ubuntu-system-settings.install 2015-01-23 19:52:01 +0000
35@@ -5,4 +5,5 @@
36 usr/share/locale
37 usr/share/ubuntu/settings/system
38 usr/share/url-dispatcher
39+usr/share/upstart/sessions/
40 usr/lib/ubuntu-push-client/legacy-helpers

Subscribers

People subscribed via source and target branches