summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/crypto.pm22
-rw-r--r--perl-install/install_steps.pm29
-rw-r--r--perl-install/install_steps_interactive.pm6
-rw-r--r--perl-install/pkgs.pm2
4 files changed, 37 insertions, 22 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index cb6517536..89ff9474d 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -85,16 +85,18 @@ sub getPackages {
$crypto::host = $mirror;
#- extract hdlist of crypto, then depslist.
- require pkgs;
- my $update_medium = pkgs::psUsingHdlist($prefix, 'ftp', $packages, "hdlist-updates.cz",
- 1+scalar(keys %{$packages->{mediums}}), "RPMS",
- #"Updates for Mandrake Linux $::VERSION", 1, getFile("base/hdlist.cz", $mirror)) and
- "Updates for Mandrake Linux 8.1", 1, getFile("base/hdlist.cz", $mirror)) and
- log::l("read updates hdlist");
- #- keep in mind where is the URL prefix used according to mirror (for install_any::install_urpmi).
- $update_medium->{prefix} = dir($mirror);
-
- return $update_medium;
+ eval {
+ require pkgs;
+ my $update_medium = pkgs::psUsingHdlist($prefix, 'ftp', $packages, "hdlist-updates.cz", "1u", "RPMS",
+ #"Updates for Mandrake Linux $::VERSION", 1, getFile("base/hdlist.cz", $mirror)) and
+ "Updates for Mandrake Linux 8.1", 1, getFile("base/hdlist.cz", $mirror)) and
+ log::l("read updates hdlist");
+ #- keep in mind where is the URL prefix used according to mirror (for install_any::install_urpmi).
+ $update_medium->{prefix} = dir($mirror);
+
+ return $update_medium;
+ };
+ return; #- an exception occurred, so ignore it.
}
sub get {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 14396d13d..3819e495d 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -435,13 +435,7 @@ Consoles 1,3,4,7 may also contain interesting information";
substInFile { s/^cdrom\n//; $_ .= "cdrom\n" if eof } "$msec/group.conf" if -d $msec;
substInFile { s/^cdwriter\n//; $_ .= "cdwriter\n" if eof } "$msec/group.conf" if -d $msec;
- my $pkg = pkgs::packageByName($o->{packages}, 'urpmi');
- if ($pkg && pkgs::packageSelectedOrInstalled($pkg)) {
- install_any::install_urpmi($o->{prefix},
- $::oem ? 'cdrom' : $o->{method}, #- HACK
- $o->{packages}{mediums});
- pkgs::saveCompssUsers($o->{prefix}, $o->{packages}, $o->{compssUsers}, $o->{compssUsersSorted});
- }
+ $o->install_urpmi;
# #- update language and icons for KDE.
# update_gnomekderc($_, 'Locale', Language => "") foreach list_skels($o->{prefix}, '.kderc');
@@ -525,6 +519,20 @@ sub copyKernelFromFloppy {
fs::umount("/floppy");
}
+sub install_urpmi {
+ my ($o) = @_;
+
+ my $pkg = pkgs::packageByName($o->{packages}, 'urpmi');
+ if ($pkg && pkgs::packageSelectedOrInstalled($pkg)) {
+ install_any::install_urpmi($o->{prefix},
+ $::oem ? 'cdrom' : $o->{method}, #- HACK
+ $o->{packages}{mediums});
+ pkgs::saveCompssUsers($o->{prefix}, $o->{packages}, $o->{compssUsers}, $o->{compssUsersSorted});
+ }
+
+
+}
+
sub updateModulesFromFloppy {
my ($o) = @_;
return if $::testing || !$o->{updatemodules};
@@ -595,8 +603,11 @@ sub installUpates {
upNetwork($o);
require crypto;
- my @crypto_packages = crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror});
- $o->pkg_install(@{$u->{packages} || []});
+ crypto::getPackages($o->{prefix}, $o->{packages}, $u->{mirror}) and
+ $o->pkg_install(@{$u->{packages} || []});
+
+ #- re-install urpmi with update security medium.
+ $o->install_urpmi;
}
sub summary {
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index bd1591d39..fa5e8cd43 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -920,8 +920,10 @@ Do you want to continue ?")) || return;
};
if ($update_medium) {
- $o->choosePackagesTree($o->{packages}, $update_medium);
- $o->pkg_install();
+ if ($o->choosePackagesTree($o->{packages}, $update_medium)) {
+ $o->pkg_install;
+ $o->install_urpmi;
+ }
}
#- stop interface using ppp only.
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 9110d403d..e8dd9fac2 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -417,7 +417,7 @@ sub psUsingHdlist {
log::l("trying to read $hdlist for medium $medium");
#- if the medium already exist, use it.
- $packages->{mediums}{$medium} and return;
+ $packages->{mediums}{$medium} and return $packages->{mediums}{$medium};
my $m = $packages->{mediums}{$medium} = { hdlist => $hdlist,
method => $method,