=== modified file 'data/package-hooks/source_linux.py' --- data/package-hooks/source_linux.py 2009-10-06 01:53:16 +0000 +++ data/package-hooks/source_linux.py 2009-10-06 02:35:52 +0000 @@ -16,7 +16,76 @@ import subprocess from apport.hookutils import * -def add_info(report): +def add_info(report, ui): + + tags = [] + + ui.information("As part of the bug reporting process, you'll be asked a series of questions to help provide a more descriptive bug report. Please answer the following questions to the best of your ability. Afterwards, a browser will be opened to finish filing this as a bug in the Launchpad bug tracking system.") + + response = ui.yesno("Has this issue been confirmed to exist with the upstream kernel?") + if response == None: #user cancelled + raise StopIteration + + if response == False: + report['TestedUpstream'] = "No" + tags.append("needs-upstream-testing") + testupstream = ui.yesno("Testing the upstream kernel can help isolate issues in Ubuntu kernel patches, discover a bug is fixed upstream, or confirm the issue exists upstream. Would you like to test the upstream kernel first before reporting this bug?") + if testupstream == True: + ui.information("For information on testing the upstream kernel, refer to https://wiki.ubuntu.com/KernelTeam/MainlineBuilds") + raise StopIteration + + elif response == True: + report['TestedUpstream'] = "Yes" + ui.information("It can also be beneficial to report this bug upstream at http://bugzilla.kernel.org/ so that the upstream kernel developers are also aware of the issue.") + + response = ui.yesno("A bug is considered a regression if the issue did not exist on a previous kernel. Is this a regression?") + if response == None: #user cancelled + raise StopIteration + + report['Regression'] = "No" + if response == True: + report['Regression'] = "Yes" + regression_tags = ["regression-release", "regression-potential", + "regression-update", "regression-proposed", + "regression-potential"] + + # add code to check if running dev release; if so, tag regression-potential and move on. + regression = ui.choice("How would you describe the regression?", + ["regression-release - A regression in a new stable release.", + "regression-potential - A bug discovered in the development release that was not present in the stable release.", + "regression-update - A regression introduced by an updated package in the stable release.", + "regression-proposed - A regression introduced by a package in -proposed .", + "I don't know."], False) + + #Don't Know response defaults to regression-potential + tags.append(regression_tags[regression[0]]) + ui.information("If possible, when filling out your bug report later on, please note the most recent kernel version where this was not an issue.") + + response = ui.yesno("Can you recreate this bug with a specific series of steps?") + + if response == None: #user cancelled + raise StopIteration + + if response == True: + report['Reproducible'] = "Yes" + ui.information("After apport finishes collection debug information, please document your steps to reproduce the issue when filling out the bug report.") + elif response == False: + report['Reproducible'] = "No" + frequency_options = ["Once a day.", + "Once every few days.", + "Once a week.", + "Once every few weeks.", + "Once a month.", + "Once every few months.", + "This has only happened once."] + + frequency = ui.choice("How often does this issue appear?", + frequency_options) + report['Frequency'] = frequency_options[frequency[0]] + + report.setdefault('Tags', '') + report['Tags'] += ' ' + ' '.join(tags) + attach_hardware(report) attach_alsa(report)