xorg: Changes to 'ubuntu'
debian/apport/source_xorg.py | 27 ++++++++++++++++++++-------
debian/changelog | 9 +++++++--
2 files changed, 27 insertions(+), 9 deletions(-)
New commits:
commit 1643fb389898dbdbf1e79e1b4fe53e5a417fd161
Author: Bryce Harrington <bryce@bryceharrington.org>
Date: Mon Mar 8 19:04:27 2010 -0800
Fix fglrx/nvidia detection logic
diff --git a/debian/apport/source_xorg.py b/debian/apport/source_xorg.py
index 0e109ee..4916078 100644
--- a/debian/apport/source_xorg.py
+++ b/debian/apport/source_xorg.py
@@ -22,6 +22,20 @@ def installed_version(pkg):
output = script.communicate()[0]
return output.split('\n')[1].replace("Installed: ", "")
+def nonfree_graphics_module(module_list = '/proc/modules'):
+ '''
+ Check loaded modules to see if a proprietary graphics driver is loaded.
+ Return the first such driver found.
+ '''
+ try:
+ mods = [l.split()[0] for l in open(module_list)]
+ except IOError:
+ return None
+
+ for m in mods:
+ if m == "nvidia" or m == "fglrx":
+ return m
+
def add_info(report, ui):
tags = []
@@ -30,9 +44,9 @@ def add_info(report, ui):
tags.append(codename)
report['system'] = "distro: Ubuntu\n"
- report['system'] += "codename: " + codename
- report['system'] += "architecture: " + command_output(['uname','-m'])
- report['system'] += "kernel: " + command_output(['uname','-r'])
+ report['system'] += "codename: " + codename + "\n"
+ report['system'] += "architecture: " + command_output(['uname','-m']) + "\n"
+ report['system'] += "kernel: " + command_output(['uname','-r']) + "\n"
attach_related_packages(report, [
"xserver-xorg",
@@ -60,12 +74,11 @@ def add_info(report, ui):
return
if report['ProblemType'] == 'Crash' and 'Traceback' not in report:
- matches = command_output(['grep', 'fglrx', '/var/log/kern.log', '/proc/modules'])
- if (matches):
+ nonfree_driver = nonfree_graphics_module()
+ if (nonfree_driver == "fglrx"):
report['SourcePackage'] = "fglrx-installer"
- matches = command_output(['grep', 'nvidia', '/var/log/kern.log', '/proc/modules'])
- if (matches):
+ elif (nonfree_driver == "nvidia"):
report['SourcePackage'] = "nvidia-graphics-drivers"
attach_file_if_exists(report, '/etc/X11/xorg.conf', 'XorgConf')
diff --git a/debian/changelog b/debian/changelog
index 515c48c..64d1b40 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
xorg (1:7.5+3ubuntu1) UNRELEASED; urgency=low
+ [Timo Aaltonen]
* 50x11-common_determine-startup: Fix a typo in the option name
- (LP: #526532)
+ (LP: #526532)
- -- Timo Aaltonen <tjaalton@ubuntu.com> Thu, 04 Mar 2010 16:22:39 +0200
+ [Bryce Harrington]
+ * debian/apport/source_xorg.py: Fix proprietary module detection logic to
+ not send all crash bugs to -nvidia.
+
+ -- Bryce Harrington <bryce@ubuntu.com> Mon, 08 Mar 2010 19:02:40 -0800
xorg (1:7.5+3) unstable; urgency=low
Reply to: