debian/apport/source_xorg.py | 62 ++++++++++++++++++++++++++++++++++++++----- debian/changelog | 11 +++++++ 2 files changed, 66 insertions(+), 7 deletions(-)
New commits: commit 475fb3dc3fa7b2017af204b29432ee35e6c670db Author: Bryce Harrington <br...@bryceharrington.org> Date: Thu Jan 22 17:01:17 2009 -0800 Drop use of intel_reg_dumper since it requires root access. diff --git a/debian/apport/source_xorg.py b/debian/apport/source_xorg.py index 1e02e52..6a8eabf 100644 --- a/debian/apport/source_xorg.py +++ b/debian/apport/source_xorg.py @@ -127,12 +127,6 @@ def add_info(report): except OSError: pass - try: - script = subprocess.Popen(['intel_reg_dumper'], stdout=subprocess.PIPE) - report['intel_reg_dumper'] = script.communicate()[0] - except OSError: - pass - ## DEBUGING ## if __name__ == '__main__': report = {} diff --git a/debian/changelog b/debian/changelog index e52d901..84da422 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +xorg (1:7.4~5ubuntu11) UNRELEASED; urgency=low + + * apport/source_xorg.py: + - Adding system environment items recommended at + http://intellinuxgraphics.org/how_to_report_bug.html + - Add lshal + - Add debug test code + - Drop use of intel_reg_dumper since it requires root (LP: #311560) + + -- Bryce Harrington <br...@ubuntu.com> Thu, 22 Jan 2009 17:00:31 -0800 + xorg (1:7.4~5ubuntu10) jaunty; urgency=low * apport/source_xorg.py: Fix arg list to prevent error commit d652421b5a8092a789fcef07177a8a344dbd72b3 Author: Bryce Harrington <br...@bryceharrington.org> Date: Sat Jan 17 03:43:41 2009 -0800 Adding system environment items recommended at http://intellinuxgraphics.org/how_to_report_bug.html Add lshal Add debug test code diff --git a/debian/apport/source_xorg.py b/debian/apport/source_xorg.py index c0136d3..1e02e52 100644 --- a/debian/apport/source_xorg.py +++ b/debian/apport/source_xorg.py @@ -12,10 +12,53 @@ option) any later version. See http://www.gnu.org/copyleft/gpl.html for the full text of the license. ''' +# TODO: +# - Create some general purpose routines (see source_network-manager.py) +# - Parse files to generate system_environment more concisely +# - Trim lshal output to just required info + import os.path import subprocess +def installed_version(pkg): + script = subprocess.Popen(['apt-cache', 'policy', pkg], stdout=subprocess.PIPE) + output = script.communicate()[0] + return output.split('\n')[1].replace("Installed: ", "") + def add_info(report): + # Build System Environment + report['system'] = " distro: Ubuntu\n" + try: + script = subprocess.Popen(['uname', '-m'], stdout=subprocess.PIPE) + report['system'] += " architecture: " + script.communicate()[0] + except OSError: + pass + try: + script = subprocess.Popen(['uname', '-r'], stdout=subprocess.PIPE) + report['system'] += " kernel: " + script.communicate()[0] + except OSError: + pass + try: + report['system'] += " xserver-xorg: " + installed_version('xserver-xorg') + "\n" + except OSError: + pass + try: + report['system'] += " mesa: " + installed_version('libgl1-mesa-glx') + "\n" + except OSError: + pass + try: + report['system'] += " libdrm: " + installed_version('libdrm2') + "\n" + except OSError: + pass + try: + report['system'] += " -intel: " + installed_version('xserver-xorg-video-intel') + "\n" + except OSError: + pass + try: + report['system'] += " -ati: " + installed_version('xserver-xorg-video-ati') + "\n" + except OSError: + pass + try: report['XorgConf'] = open('/etc/X11/xorg.conf').read() except IOError: @@ -43,6 +86,12 @@ def add_info(report): pass try: + script = subprocess.Popen(['lshal'], stdout=subprocess.PIPE) + report['LsHal'] = script.communicate()[0] + except OSError: + pass + + try: script = subprocess.Popen(['lsmod'], stdout=subprocess.PIPE) report['LsMod'] = script.communicate()[0] except OSError: @@ -84,4 +133,9 @@ def add_info(report): except OSError: pass - +## DEBUGING ## +if __name__ == '__main__': + report = {} + add_info(report) + for key in report: + print '[%s]\n%s' % (key, report[key]) -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org