diff -u cheese-2.29.92/debian/cheese.install cheese-2.29.92/debian/cheese.install --- cheese-2.29.92/debian/cheese.install +++ cheese-2.29.92/debian/cheese.install @@ -1,2 +1,3 @@ +debian/source_cheese.py usr/share/apport/package-hooks debian/tmp/usr/bin debian/tmp/usr/share/applications diff -u cheese-2.29.92/debian/changelog cheese-2.29.92/debian/changelog --- cheese-2.29.92/debian/changelog +++ cheese-2.29.92/debian/changelog @@ -1,3 +1,12 @@ +cheese (2.29.92-0ubuntu2) lucid; urgency=low + + * debian/source_cheese.py: + - Apport hook for cheese (lp: #542091) + * debian/cheese.install; + - Ship the new apport hook. + + -- Nigel Babu Thu, 25 Mar 2010 23:45:07 +0530 + cheese (2.29.92-0ubuntu1) lucid; urgency=low * New upstream release: only in patch2: unchanged: --- cheese-2.29.92.orig/debian/source_cheese.py +++ cheese-2.29.92/debian/source_cheese.py @@ -0,0 +1,16 @@ +import os +import subprocess + +import apport.packaging +import apport.hookutils +def add_info(report, ui): + response = ui.choice("How would you describe the issue?", ["Cheese does not detect webcam or image not displayed properly", "Other problem"], False) + if response == None: # user cancelled + raise StopIteration + if response[0] == 0: # attach debug information + ui.information("Cheese will now run in debug mode. If Cheese is already running, it will be closed and reopened in debug mode. Please wait till you see a video or an error message before closing cheese") + subprocess.call(['killall', 'cheese']) + report["CheeseDebug.log"] = apport.hookutils.command_output(['env', 'GST_DEBUG=*cheese*:3', 'cheese', '-v']) + report["HardwareInformation"] = apport.hookutils.attach_hardware(report) + report["GstreamerVersions"] = apport.hookutils.package_versions("gstreamer*") + report["XorgLog"] = apport.hookutils.read_file("/var/log/Xorg.0.log")