aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-11 13:18:01 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-11 13:18:01 +0000
commitbae26ca0a2b1301cd0cee533f1f6f382b9e5f9c6 (patch)
tree311bca9aafeeff90b6244dc9e9db959a8e6ed1bc
parent562dbf7d97c6d1bba074c20d112cf5076200741a (diff)
downloadrpmdrake-bae26ca0a2b1301cd0cee533f1f6f382b9e5f9c6.tar
rpmdrake-bae26ca0a2b1301cd0cee533f1f6f382b9e5f9c6.tar.gz
rpmdrake-bae26ca0a2b1301cd0cee533f1f6f382b9e5f9c6.tar.bz2
rpmdrake-bae26ca0a2b1301cd0cee533f1f6f382b9e5f9c6.tar.xz
rpmdrake-bae26ca0a2b1301cd0cee533f1f6f382b9e5f9c6.zip
when installing packages, set urpm->{fatal} so that I can
intercept when "cancel" is clicked for the change of CD's -> we no more exit the program anymore
-rwxr-xr-xrpmdrake8
1 files changed, 8 insertions, 0 deletions
diff --git a/rpmdrake b/rpmdrake
index f67ba3ef..1514ab53 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -873,6 +873,10 @@ sub dialog_rpmnew {
sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my ($urpm) = @_;
+my $fatal_msg;
+local $urpm->{fatal} = sub { $fatal_msg = $_[1]; die };
+
+eval {
standalone::explanations("Removing package $_") foreach keys %{$urpm->{state}{ask_remove}};
my %pkgs;
@@ -934,6 +938,10 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
interactive_msg(_("Everything already installed."),
_("Everything already installed (is this supposed to happen at all?)."));
}
+};
+$@ and interactive_msg(_("Problem during installation"),
+ _("There was a problem during the installation:\n\n%s", $fatal_msg));
+
}