summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2005-02-05 03:48:50 +0000
committerFlorent Villard <warly@mandriva.com>2005-02-05 03:48:50 +0000
commit45e873af37a0d2389feb0f5dcccba71408775956 (patch)
tree115a89546c61df4b0089715e07b48227bd2c3d86 /perl-install/install_any.pm
parentd2255e43294636e26a215168ac2c32f12b414368 (diff)
downloaddrakx-backup-do-not-use-45e873af37a0d2389feb0f5dcccba71408775956.tar
drakx-backup-do-not-use-45e873af37a0d2389feb0f5dcccba71408775956.tar.gz
drakx-backup-do-not-use-45e873af37a0d2389feb0f5dcccba71408775956.tar.bz2
drakx-backup-do-not-use-45e873af37a0d2389feb0f5dcccba71408775956.tar.xz
drakx-backup-do-not-use-45e873af37a0d2389feb0f5dcccba71408775956.zip
fix copy_rpms_on_disks
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm18
1 files changed, 14 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 7af953dfb..1715f64fa 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -620,8 +620,10 @@ sub copy_rpms_on_disk {
if ($method =~ /-iso$/) {
$r = install_any::changeIso($name);
} else {
- ejectCdrom();
- $r &&= $o->ask_okcancel('', N("Change your Cd-Rom!
+ cat_("/proc/mounts") =~ m,(/dev/\S+)\s+(/mnt/cdrom|/tmp/image),
+ and ($cdrom, my $mountpoint) = ($1, $2);
+ ejectCdrom($cdrom, $mountpoint);
+ $r = $o->ask_okcancel('', N("Change your Cd-Rom!
Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done.", $name), 1);
}
return $r;
@@ -631,8 +633,14 @@ Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done.",
};
foreach my $k (pkgs::allMediums($o->{packages})) {
my $m = $o->{packages}{mediums}{$k};
- askChangeMedium($o->{method}, $m->{descr})
- or next;
+ if ($k != $current_medium) {
+ do {
+ askChangeMedium($o->{method}, $k)
+ or next;
+ mountCdrom("/tmp/image", $cdrom)
+ } while (!-d "/tmp/image/$m->{rpmsdir}");
+ $current_medium = $k
+ }
log::l("copying /tmp/image/$m->{rpmsdir} to $o->{prefix}/var/ftp/pub/Mandrakelinux/media");
my $wait_w = $o->wait_message(N("Please wait"), N("Copying in progress"));
eval { cp_af("/tmp/image/$m->{rpmsdir}", "$o->{prefix}/var/ftp/pub/Mandrakelinux/media") };
@@ -643,6 +651,8 @@ Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done.",
}
#- now the install will continue as 'disk'
$o->{method} = 'disk';
+ #- shoud be enough to fool errorOpeningFile
+ $current_medium = 1;
our $copied_rpms_on_disk = 1;
}