aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-26 11:08:49 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-26 11:08:49 +0000
commit6b918b17c3dbecf6ae23e8dbcf569275f077f8a5 (patch)
treeda6d4dd0a89f111fd32ce497836cd998dca2e061
parentc02e3a9afd72ecc0fcfae42efb37a02604911ac9 (diff)
downloadrpmdrake-6b918b17c3dbecf6ae23e8dbcf569275f077f8a5.tar
rpmdrake-6b918b17c3dbecf6ae23e8dbcf569275f077f8a5.tar.gz
rpmdrake-6b918b17c3dbecf6ae23e8dbcf569275f077f8a5.tar.bz2
rpmdrake-6b918b17c3dbecf6ae23e8dbcf569275f077f8a5.tar.xz
rpmdrake-6b918b17c3dbecf6ae23e8dbcf569275f077f8a5.zip
(get_pkgs) simplify
-rwxr-xr-xRpmdrake/pkg.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index c8e63cb0..200ece85 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -226,20 +226,17 @@ sub get_pkgs {
@update_medias = ();
my $w = $::main_window;
- my $error_happened;
- my $fatal_handler = sub {
- $error_happened = 1;
- interactive_msg(N("Fatal error"),
- N("A fatal error occurred: %s.", $_[1]));
- myexit(-1) if 0; #FIXME
- };
-
Rpmdrake::gurpm::init(1 ? N("Please wait") : N("Package installation..."), N("Initializing..."), transient => $::main_window);
my $_guard = before_leaving { Rpmdrake::gurpm::end() };
my $_flush_guard = Gtk2::GUI_Update_Guard->new;
+ my $error_happened;
$urpm = urpm->new;
- $urpm->{fatal} = $fatal_handler;
+ $urpm->{fatal} = sub {
+ $error_happened = 1;
+ interactive_msg(N("Fatal error"),
+ N("A fatal error occurred: %s.", $_[1]));
+ };
my $media = ref $::options{media} ? join(',', @{$::options{media}}) : '';
urpm::media::configure($urpm, media => $media);
if ($error_happened) {