From 976b4b9ebedb00801d2e61b496c2b068e80157fd Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 19 Feb 2003 16:52:22 +0000 Subject: code slight reorganization. --- perl-install/crypto.pm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm index 56af9893c..4e4160b80 100644 --- a/perl-install/crypto.pm +++ b/perl-install/crypto.pm @@ -136,19 +136,20 @@ sub getPackages { #- extract hdlist of crypto, then depslist. require pkgs; my $update_medium = pkgs::psUsingHdlist($prefix, 'ftp', $packages, "hdlist-updates.cz", "1u", "RPMS", - "Updates for Mandrake Linux " . version(), 1, $fhdlist) 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} = "ftp://$mirror" . dir($mirror); - #- (re-)enable the medium to allow install of package, - #- make it an update medium (for install_any::install_urpmi). - $update_medium->{selected} = 1; - $update_medium->{update} = 1; - - #- search for packages to update. - $packages->{rpmdb} ||= pkgs::rpmDbOpen($prefix); - pkgs::selectPackagesToUpgrade($packages, $prefix, $update_medium); - + "Updates for Mandrake Linux " . version(), 1, $fhdlist); + if ($update_medium) { + 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} = "ftp://$mirror" . dir($mirror); + #- (re-)enable the medium to allow install of package, + #- make it an update medium (for install_any::install_urpmi). + $update_medium->{selected} = 1; + $update_medium->{update} = 1; + + #- search for packages to update. + $packages->{rpmdb} ||= pkgs::rpmDbOpen($prefix); + pkgs::selectPackagesToUpgrade($packages, $prefix, $update_medium); + } return $update_medium; } -- cgit v1.2.1