Merge lp:~ev/apport/quantal into lp:~ubuntu-core-dev/ubuntu/quantal/apport/ubuntu

Proposed by Evan
Status: Merged
Approved by: Martin Pitt
Approved revision: 2063
Merged at revision: 2110
Proposed branch: lp:~ev/apport/quantal
Merge into: lp:~ubuntu-core-dev/ubuntu/quantal/apport/ubuntu
Diff against target: 52 lines (+18/-2) (has conflicts)
2 files modified
data/general-hooks/ubuntu.py (+8/-2)
debian/changelog (+10/-0)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~ev/apport/quantal
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+131033@code.launchpad.net

Description of the change

This change includes the date that Ubuntu was installed on, with each report. As mentioned in the linked bug report, this lets us answer questions that pay particular attention to when a crash occurred relative to installation like, "What is the percentage of systems that have a high initial rate of crashes, which continue submitting crash reports after a week / a month / three months?"

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Looks good to me, thanks! (just needs rebasing against the current -proposed version, of course)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/general-hooks/ubuntu.py'
2--- data/general-hooks/ubuntu.py 2012-09-18 13:01:59 +0000
3+++ data/general-hooks/ubuntu.py 2012-10-23 15:26:20 +0000
4@@ -291,8 +291,8 @@
5
6 def add_release_info(report):
7 # https://bugs.launchpad.net/bugs/364649
8- apport.hookutils.attach_file_if_exists(
9- report, '/var/log/installer/media-info', 'InstallationMedia')
10+ media = '/var/log/installer/media-info'
11+ apport.hookutils.attach_file_if_exists(report, media, 'InstallationMedia')
12
13 # if we are running from a live system, add the build timestamp
14 apport.hookutils.attach_file_if_exists(
15@@ -310,6 +310,12 @@
16 else:
17 add_tag(report, release_codename)
18
19+ if os.path.exists(media):
20+ mtime = os.stat(media).st_mtime
21+ human_mtime = time.strftime('%Y-%m-%d', time.gmtime(mtime))
22+ delta = time.time() - mtime
23+ report['InstallationDate'] = 'Installed %s on %s (%d days ago)' % (release_codename, human_mtime, delta / 86400)
24+
25 log = '/var/log/dist-upgrade/main.log'
26 if os.path.exists(log):
27 mtime = os.stat(log).st_mtime
28
29=== modified file 'debian/changelog'
30--- debian/changelog 2012-10-16 20:35:15 +0000
31+++ debian/changelog 2012-10-23 15:26:20 +0000
32@@ -1,3 +1,4 @@
33+<<<<<<< TREE
34 apport (2.6.1-0ubuntu4) quantal-proposed; urgency=low
35
36 * apport/ui.py: create a MarkForUpload field and set that to false for
37@@ -226,6 +227,15 @@
38
39 -- Brian Murray <brian@ubuntu.com> Wed, 15 Aug 2012 16:07:34 -0700
40
41+=======
42+apport (2.4-0ubuntu6.1) UNRELEASED; urgency=low
43+
44+ * Include the date that Ubuntu was installed with each report
45+ (LP: #1070400).
46+
47+ -- Evan Dandrea <ev@ubuntu.com> Tue, 23 Oct 2012 16:17:44 +0100
48+
49+>>>>>>> MERGE-SOURCE
50 apport (2.4-0ubuntu6) quantal; urgency=low
51
52 * debian/control:

Subscribers

People subscribed via source and target branches