summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-20 09:49:19 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-20 09:49:19 +0000
commitfdd26830000b027738f46569b2058f3e884f6451 (patch)
treee2785c98572193aa3d9847032e3cb0402b2d3955 /perl-install/pkgs.pm
parent651a256ee82c18578c3f551e89d3bcadaf68ab43 (diff)
downloaddrakx-backup-do-not-use-fdd26830000b027738f46569b2058f3e884f6451.tar
drakx-backup-do-not-use-fdd26830000b027738f46569b2058f3e884f6451.tar.gz
drakx-backup-do-not-use-fdd26830000b027738f46569b2058f3e884f6451.tar.bz2
drakx-backup-do-not-use-fdd26830000b027738f46569b2058f3e884f6451.tar.xz
drakx-backup-do-not-use-fdd26830000b027738f46569b2058f3e884f6451.zip
Fix supplementary CDs with any kind of media
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 3b180b751..f272926db 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -927,6 +927,8 @@ sub selectPackagesToUpgrade {
sub allowedToUpgrade { $_[0] !~ /^(kernel|kernel22|kernel2.2|kernel-secure|kernel-smp|kernel-linus|kernel-linus2.2|hackkernel|kernel-enterprise)$/ }
+sub supplCDMountPoint { $::o->{mainmethod} eq 'cdrom' ? "/tmp/image" : "/mnt/cdrom" }
+
sub installTransactionClosure {
my ($packages, $id2pkg) = @_;
my ($id, %closure, @l, $medium, $min_id, $max_id);
@@ -964,6 +966,7 @@ sub installTransactionClosure {
#- Supplementary CD : switch temporarily to "cdrom" method
my $suppl_CD = isSupplCDMedium($medium);
+ $::o->{mainmethod} = $::o->{method};
local $::o->{method} = do {
my $cdrom;
cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image), and $cdrom = $1;
@@ -973,7 +976,7 @@ sub installTransactionClosure {
log::l("cdrom redetected at $cdrom");
devices::make($cdrom);
install_any::ejectCdrom($cdrom) if $::o->{method} eq 'cdrom';
- install_any::mountCdrom("/mnt/cdrom", $cdrom);
+ install_any::mountCdrom(supplCDMountPoint(), $cdrom);
} else { log::l("cdrom already found at $cdrom") }
'cdrom';
} if $suppl_CD;
@@ -983,7 +986,7 @@ sub installTransactionClosure {
my $pkg = $packages->{depslist}[$l[0]];
#- force changeCD callback to be called from main process.
- install_any::getFile($pkg->filename, $medium->{descr}, $suppl_CD ? '/mnt/cdrom' : undef);
+ install_any::getFile($pkg->filename, $medium->{descr}, $suppl_CD ? supplCDMountPoint() : undef);
#- close opened handle above.
install_any::getFile('XXX');
}
@@ -1140,8 +1143,7 @@ sub install($$$;$$) {
my $f = $pkg && $pkg->filename;
print $LOG "$f\n";
if (isSupplCDMedium($medium)) {
- #- supplementary CD already mounted in /mnt/cdrom
- $fd = install_any::getFile($f, $medium->{descr}, '/mnt/cdrom');
+ $fd = install_any::getFile($f, $medium->{descr}, supplCDMountPoint());
} else {
$fd = install_any::getFile($f, $medium->{descr}, $medium->{prefix});
}