diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-06 09:38:03 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-06 09:38:03 +0000 |
commit | 68056bcdfaa733cabef68e1cac5104842a2a7e75 (patch) | |
tree | 1574693c14b4985e2cb81049b52a0a1564cbce73 /perl-install | |
parent | f938169defca430389beefecf789b9c00eda854a (diff) | |
download | drakx-68056bcdfaa733cabef68e1cac5104842a2a7e75.tar drakx-68056bcdfaa733cabef68e1cac5104842a2a7e75.tar.gz drakx-68056bcdfaa733cabef68e1cac5104842a2a7e75.tar.bz2 drakx-68056bcdfaa733cabef68e1cac5104842a2a7e75.tar.xz drakx-68056bcdfaa733cabef68e1cac5104842a2a7e75.zip |
Make the network supplementary media probe able to find an hdlists file
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_any.pm | 13 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 4 |
2 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index ae52df299..057fe4115 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -441,8 +441,8 @@ sub selectSupplMedia { useMedium($medium_name); #- probe for an hdlists file and then look for all hdlists listed herein - eval { pkgs::psUsingHdlists($o, $suppl_method, "/mnt/cdrom/media/media_info/hdlists", $o->{packages}, '1s') }; - log::l("psUsingHdlists failed: $@"); + eval { pkgs::psUsingHdlists($o, $suppl_method, "/mnt/cdrom/", $o->{packages}, $medium_name) }; + log::l("psUsingHdlists failed: $@") if $@; #- copy latest compssUsers.pl and rpmsrate somewhere locally getAndSaveFile("/mnt/cdrom/media/media_info/compssUsers.pl", "/tmp/compssUsers.pl"); @@ -468,6 +468,15 @@ sub selectSupplMedia { my $url = $o->ask_from_entry('', N("URL of the mirror?")) or return ''; useMedium($medium_name); require "$suppl_method.pm"; + #- first, try to find an hdlists file + eval { pkgs::psUsingHdlists($o, $suppl_method, "$url/", $o->{packages}, $medium_name) }; + if ($@) { + log::l("psUsingHdlists failed: $@"); + } else { + useMedium($prev_asked_medium); #- back to main medium + return $suppl_method; + } + #- then probe for an hdlist.cz my $f = eval { if ($suppl_method eq 'http') { http::getFile("$url/media_info/hdlist.cz"); diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 87f29b11f..c0105b055 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -380,7 +380,7 @@ sub psUpdateHdlistsDeps { sub psUsingHdlists { my ($o, $method, $o_hdlistsfile, $o_packages, $o_initialmedium) = @_; my $prefix = $o->{prefix}; - my $listf = install_any::getFile($o_hdlistsfile || 'media/media_info/hdlists') + my $listf = install_any::getFile($o_hdlistsfile . 'media/media_info/hdlists') or die "no hdlists found"; my ($suppl_CDs, $deselectionAllowed) = (0, 0); if (!$o_packages) { @@ -406,7 +406,7 @@ sub psUsingHdlists { m/^\s*(noauto:)?(hdlist\S*\.cz2?)\s+(\S+)\s*(.*)$/ or die qq(invalid hdlist description "$_" in hdlists file); push @hdlists, [ $2, $medium_name, $3, $4, !$1, #- hdlist path, suppl CDs are mounted on /mnt/cdrom : - $cdsuppl ? "/mnt/cdrom/media/media_info/$2" : undef, + $o_hdlistsfile ? "$o_hdlistsfile/media/media_info/$2" : undef, ]; $cdsuppl ? ($medium_name = ($medium_name + 1) . 's') : ++$medium_name; } |