diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-07-03 14:00:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-07-03 14:00:57 +0000 |
commit | b6c395b11e39b09bf949d37936bf4cd516a58568 (patch) | |
tree | d1033691352a2185c2eb4b375d8b9d99b338c765 | |
parent | 89370305abf885c0ff3f173b86197467128bae74 (diff) | |
download | rpmdrake-b6c395b11e39b09bf949d37936bf4cd516a58568.tar rpmdrake-b6c395b11e39b09bf949d37936bf4cd516a58568.tar.gz rpmdrake-b6c395b11e39b09bf949d37936bf4cd516a58568.tar.bz2 rpmdrake-b6c395b11e39b09bf949d37936bf4cd516a58568.tar.xz rpmdrake-b6c395b11e39b09bf949d37936bf4cd516a58568.zip |
(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) [BACKPORT]
-rwxr-xr-x | Rpmdrake/pkg.pm | 25 |
1 files changed, 17 insertions, 8 deletions
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'}, |