summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakbug88
1 files changed, 43 insertions, 45 deletions
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index 63d4868da..365d90442 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -166,51 +166,7 @@ gtkadd($window->{window},
0, gtkpack(create_hbox('edge'),
gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub { system("drakhelp --id drakbug &") }),
gtkpack(create_hbox('end'),
- gtksignal_connect(Gtk2::Button->new(N("Report")), clicked => sub {
- my $p = $package->get_text;
- my ($product, $version) = $p =~ /^(.*)-([^-]+-[^-]+(mdk|mdv.*))$/; # FIXME: fragile!
- my $app = $comb_app->entry->get_text;
- my $component = $app ?
- if_(member($app, @all_drakxtools), $app) || $mdk_app->{$app} :
- $product;
- my $text;
- if ($incident) {
- my $buffer = $user_descr->get_buffer;
- $text = $buffer->get_text($buffer->get_start_iter, $buffer->get_end_iter, 0);
- if (!$text) {
- err_dialog(N("Warning"),
- N("You must type in what you were doing when this bug happens in order to increase the reproductibility of this bug and the odds of fixing it")
- . "\n\n" . N("Thanks."));
- return;
- }
- }
- my $rel_data = mandrake_release_info();
- my $rel = standalone::real_version();
- my $options = join('&',
- ($product || $version ?
- 'cf_rpmpkg=' . join('-', $product, $version) : ()),
-'version=' . ($rel_data->{branch} eq 'Devel' ? 'Cooker' : $rel_data->{version} ),
- 'component=Core%20Packages',
- 'classification=Mandriva%20Linux',
- if_($incident,
- "short_desc=$prog%20" . ($segfaulted ? 'segfaulted' : 'crashed'),
- 'comment=' . uri_escape(qq(The "$prog" program crashed. Drakbug-$rel caught it.
-
-). ($text || "Please describe what you were doing when it crashed.") . "\n\n"
-. ($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))
- . if_($gdb_trace, qq(
-GDB backtrace was:
-$gdb_trace)),
- ),
- ),
- );
- print($bugzilla_url . "?" . $options . "\n");
- run_program::raw({ detach => 1, setuid => $parent_uid },
- '/usr/bin/www-browser', "$bugzilla_url?$options");
- }
- ),
+ gtksignal_connect(Gtk2::Button->new(N("Report")), clicked => \&report_bug_to_bugzilla),
gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub { ugtk2->exit(0) }),
))));
@@ -266,4 +222,46 @@ sub get_package {
$rpm_package;
}
+sub report_bug_to_bugzilla {
+ my $p = $package->get_text;
+ my ($product, $version) = $p =~ /^(.*)-([^-]+-[^-]+(mdk|mdv.*))$/; # FIXME: fragile!
+ my $app = $comb_app->entry->get_text;
+ my $component = $app ?
+ if_(member($app, @all_drakxtools), $app) || $mdk_app->{$app} :
+ $product;
+ my $text;
+ if ($incident) {
+ my $buffer = $user_descr->get_buffer;
+ $text = $buffer->get_text($buffer->get_start_iter, $buffer->get_end_iter, 0);
+ if (!$text) {
+ err_dialog(N("Warning"),
+ N("You must type in what you were doing when this bug happens in order to increase the reproductibility of this bug and the odds of fixing it")
+ . "\n\n" . N("Thanks."));
+ return;
+ }
+ }
+ my $rel_data = mandrake_release_info();
+ my $rel = standalone::real_version();
+ my $options = join('&',
+ ($product || $version ? 'cf_rpmpkg=' . join('-', $product, $version) : ()),
+ 'version=' . ($rel_data->{branch} eq 'Devel' ? 'Cooker' : $rel_data->{version} ),
+ 'component=Core%20Packages',
+ 'classification=Mandriva%20Linux',
+ if_($incident,
+ "short_desc=$prog%20" . ($segfaulted ? 'segfaulted' : 'crashed'),
+ 'comment=' . uri_escape(qq(The "$prog" program crashed. Drakbug-$rel caught it.
+
+). ($text || "Please describe what you were doing when it crashed.") . "\n\n"
+ . ($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))
+ . if_($gdb_trace, qq(
+GDB backtrace was:
+$gdb_trace)),
+ ),
+ ),
+ );
+ print($bugzilla_url . "?" . $options . "\n");
+ run_program::raw({ detach => 1, setuid => $parent_uid }, '/usr/bin/www-browser', "$bugzilla_url?$options");
+}