From 9becc48da70169c2a45f09f945dd7f4bd67a3fce Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 1 Aug 2007 20:50:00 +0000 Subject: add --error option in order to provide a backtrace --- perl-install/standalone/drakbug | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone/drakbug') diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug index 82044336c..d2d3fd2a9 100755 --- a/perl-install/standalone/drakbug +++ b/perl-install/standalone/drakbug @@ -27,15 +27,17 @@ use common; use mygtk2 qw(gtknew); use ugtk2 qw(:all); use Config; +use URI::Escape; my $prog; my $incident = 0; -my ($table, $comb_app, $com_app, $button_pkg, $package, $distrocode); +my ($table, $comb_app, $com_app, $button_pkg, $package, $distrocode, $error); my $i; foreach (@ARGV) { next unless defined $_; $i++; + /^--error$/ and do { $error = splice(@ARGV, $i, 1) }; /^--report$/ and $prog = splice(@ARGV, $i, 1); /^--incident$/ and do { $incident = 1; $prog = splice(@ARGV, $i, 1) }; } @@ -111,7 +113,17 @@ gtkadd($window->{window}, 'cf_rpmpkg=' . join('-', $product, $version) : ()), 'component=Core%20Packages', 'classification=Mandriva%20Linux', - if_($prog, "short_desc=$prog%20crashed"), + if_($prog, + "short_desc=$prog%20crashed", + 'comment=' . uri_escape(qq(The "$prog" program crashed. + +Please describe what you were doing when it crashed. + +) . ($error ? qq(Backtrace was: +$error) : +qq(If you can, try to run the "$prog" program from a terminal and copy and paste here any error messages and/or backtrace)), + ), + ), ); print($bugzilla_url . "?" . $options . "\n"); require run_program; -- cgit v1.2.1