Merge lp:~darkxst/gnome-shell/apport-hook-update-lp1058845 into lp:ubuntu/quantal/gnome-shell

Proposed by Tim Lunn
Status: Merged
Merge reported by: Mathieu Trudel-Lapierre
Merged at revision: not available
Proposed branch: lp:~darkxst/gnome-shell/apport-hook-update-lp1058845
Merge into: lp:ubuntu/quantal/gnome-shell
Diff against target: 58 lines (+41/-2)
2 files modified
debian/changelog (+8/-0)
debian/source_gnome-shell.py (+33/-2)
To merge this branch: bzr merge lp:~darkxst/gnome-shell/apport-hook-update-lp1058845
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+127410@code.launchpad.net

Description of the change

Update apport hooks to
   - Record running Display Manager
   - Collect gnome-shell session logs

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Marking as Merged since this was recently marked as Fix Released in Quantal.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-09-26 18:16:43 +0000
3+++ debian/changelog 2012-10-02 03:02:19 +0000
4@@ -1,3 +1,11 @@
5+gnome-shell (3.6.0-0ubuntu3) UNRELEASED; urgency=low
6+
7+ * debian/source_gnome-shell.py
8+ - Update apport hook to log running display manager(LP: 1058845)
9+ - Update apport hook to collect gnome-shell session logs
10+
11+ -- Tim Lunn <tim@feathertop.org> Sun, 30 Sep 2012 10:48:36 +1000
12+
13 gnome-shell (3.6.0-0ubuntu2) quantal; urgency=low
14
15 * debian/control.in,gnome-shell-common.install:
16
17=== modified file 'debian/source_gnome-shell.py'
18--- debian/source_gnome-shell.py 2012-09-19 11:12:56 +0000
19+++ debian/source_gnome-shell.py 2012-10-02 03:02:19 +0000
20@@ -1,5 +1,36 @@
21 from apport.hookutils import *
22+import os
23+
24+def is_process_running(proc):
25+ '''
26+ Determine if process has a registered process id
27+ '''
28+ log = command_output(['pidof', proc])
29+ if not log or log[:5] == "Error" or len(log)<1:
30+ return False
31+ return True
32
33 def add_info(report):
34- attach_gsettings_package(report, 'gnome-shell-common')
35- attach_gsettings_schema(report, 'org.gnome.desktop.interface')
36+ attach_gsettings_package(report, 'gnome-shell-common')
37+ attach_gsettings_schema(report, 'org.gnome.desktop.interface')
38+
39+ result = ''
40+
41+ dm_list = apport.hookutils.command_output(['sh', '-c',
42+ 'apt-cache search \"display manager\" | cut -d \' \' -f1 | grep dm$'])
43+
44+ for line in dm_list.split('\n'):
45+ if (is_process_running(line)):
46+ result = line
47+ break
48+
49+ report['DisplayManager'] = result
50+
51+ HOME = os.path.expanduser("~")
52+ if result == 'gdm':
53+ attach_file_if_exists(report, HOME+'/.cache/gdm/session.log',key='gdmSessionLog')
54+ else:
55+ attach_file_if_exists(report, HOME+'/.xsession-errors',key='XsessionLog')
56+
57+
58+

Subscribers

People subscribed via source and target branches

to all changes: