From 497b9422ac9ceab83f7c74fae177896dac0c49d9 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 3 Jul 2007 13:51:33 +0000 Subject: (perform_installation) Gtk2::GUI_Update_Guard->new use of alarm() kill us when running system(), thus making DVD being ejected and printing wrong error messages (#30463) --- Rpmdrake/pkg.pm | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 955e4103..3613139c 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -543,16 +543,25 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( my %sources = %$local_sources; my %error_sources; - urpm::removable::copy_packages_of_removable_media($urpm, + { + # Gtk2::GUI_Update_Guard->new use of alarm() kill us when + # running system(), thus making DVD being ejected and printing + # wrong error messages (#30463) + + local $SIG{ALRM} = sub { die "ALARM" }; + my $remaining = alarm(0); + urpm::removable::copy_packages_of_removable_media($urpm, $list, \%sources, sub { - interactive_msg( - N("Change medium"), - N("Please insert the medium named \"%s\" on device [%s]", $_[0], $_[1]), - yesno => 1, text => { no => N("Cancel"), yes => N("Ok") }, - ); - }, - ); + interactive_msg( + N("Change medium"), + N("Please insert the medium named \"%s\" on device [%s]", $_[0], $_[1]), + yesno => 1, text => { no => N("Cancel"), yes => N("Ok") }, + ); + }, + ); + alarm $remaining; + } urpm::install::create_transaction($urpm, $state, nodeps => $urpm->{options}{'allow-nodeps'} || $urpm->{options}{'allow-force'}, -- cgit v1.2.1