diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-03-11 15:33:49 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-03-11 15:33:49 +0000 |
commit | 937c72175b0e5d24e1ba42d8c35cb5e3e54172bf (patch) | |
tree | 2f5bc633335120c22153f113e4b5ecc2729cf6f6 | |
parent | 0b88c3466e47ef6e88c0fdaddbb349da4cb7a3eb (diff) | |
download | urpmi-937c72175b0e5d24e1ba42d8c35cb5e3e54172bf.tar urpmi-937c72175b0e5d24e1ba42d8c35cb5e3e54172bf.tar.gz urpmi-937c72175b0e5d24e1ba42d8c35cb5e3e54172bf.tar.bz2 urpmi-937c72175b0e5d24e1ba42d8c35cb5e3e54172bf.tar.xz urpmi-937c72175b0e5d24e1ba42d8c35cb5e3e54172bf.zip |
enhance cdrom fallback without perl-Hal-Cdroms
-rw-r--r-- | urpm/cdrom.pm | 2 | ||||
-rwxr-xr-x | urpmi | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/urpm/cdrom.pm b/urpm/cdrom.pm index 385ac978..6b3ffc5c 100644 --- a/urpm/cdrom.pm +++ b/urpm/cdrom.pm @@ -63,7 +63,7 @@ sub _try_mounting_cdrom_using_hal { $urpm->{cdrom_mounted} = {}; # reset - eval { require Hal::Cdroms; 1 } or $urpm->{error}(N("you must mount cdrom or install perl-Hal-Cdroms to have it done automatically")), return(); + eval { require Hal::Cdroms; 1 } or $urpm->{error}(N("You must mount cdrom yourself (or install perl-Hal-Cdroms to have it done automatically)")), return(); my $hal_cdroms = Hal::Cdroms->new; foreach my $hal_path ($hal_cdroms->list) { @@ -627,11 +627,14 @@ my $exit_code = urpm::main_loop::run($urpm, $state, return system($gmessage, '-buttons', N("Ok") . ':1,' . N("Cancel") . ':0', "\n$msg\n"); } } - print "$msg\n"; - - require Hal::Cdroms; - Hal::Cdroms->new->wait_for_insert; - 1; + if (eval { require Hal::Cdroms; 1 }) { + print "$msg\n"; + Hal::Cdroms->new->wait_for_insert; + 1; + } else { + my $msg2 = N("Press Enter when mounted..."); + defined message_input_("$msg\n$msg2 "); + } }) : ()), trans_log => sub { # my ($mode, $file, $percent, $total, $eta, $speed) = @_; |