diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-16 07:56:07 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-09-16 07:56:07 +0000 |
commit | 888d12be116a411b458120463c124dca65dd6b31 (patch) | |
tree | f75df10f676e2d711a430c5a7c931be499a9eda2 /perl-install | |
parent | e0ef120d499d4dcce9c842564a6e31cc46d796c9 (diff) | |
download | drakx-888d12be116a411b458120463c124dca65dd6b31.tar drakx-888d12be116a411b458120463c124dca65dd6b31.tar.gz drakx-888d12be116a411b458120463c124dca65dd6b31.tar.bz2 drakx-888d12be116a411b458120463c124dca65dd6b31.tar.xz drakx-888d12be116a411b458120463c124dca65dd6b31.zip |
Kludgy fix for bug 11558 : sometimes when restarting the installer at the
step where partitions are read, it'll be needed to reaload the rpmsrate
and compssUsers.pl to avoid a crash a bit later.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/install_any.pm | 30 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 2 |
2 files changed, 21 insertions, 11 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 022db2e54..1e9893242 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -441,6 +441,8 @@ sub prep_net_suppl_media { delete $INC{'IO/Socket.pm'}; delete $INC{'IO/Socket/UNIX.pm'}; delete $INC{'IO/Socket/INET.pm'}; + delete $INC{'ftp.pm'}; + delete $INC{'http.pm'}; require IO::Socket; } @@ -511,7 +513,8 @@ sub selectSupplMedia { $url = $o->ask_from_entry('', N("URL of the mirror?")) or return 'error'; } useMedium($medium_name); - require "$suppl_method.pm"; #- require http or ftp + require http; + require ftp if $suppl_method eq 'ftp'; #- first, try to find an hdlists file eval { pkgs::psUsingHdlists($o, $suppl_method, $url, $o->{packages}, $medium_name, \&setup_suppl_medium) }; if ($@) { @@ -583,6 +586,20 @@ sub _media_rank { $y; } +sub load_rate_files { + my ($o) = @_; + #- must be done after getProvides + #- if there is a supplementary media, the rpmsrate/compssUsers are overridable + pkgs::read_rpmsrate( + $o->{packages}, + getFile(-e "/tmp/rpmsrate" ? "/tmp/rpmsrate" : "media/media_info/rpmsrate") + ); + ($o->{compssUsers}, $o->{gtk_display_compssUsers}) = pkgs::readCompssUsers( + $o->{meta_class}, + -e '/tmp/compssUsers.pl' ? '/tmp/compssUsers.pl' : 'media/media_info/compssUsers.pl' + ); +} + sub setPackages { my ($o, $rebuild_needed) = @_; @@ -603,16 +620,7 @@ sub setPackages { pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1); - #- must be done after getProvides - #- if there is a supplementary media, the rpmsrate/compssUsers are overridable - pkgs::read_rpmsrate( - $o->{packages}, - getFile(-e "/tmp/rpmsrate" ? "/tmp/rpmsrate" : "media/media_info/rpmsrate") - ); - ($o->{compssUsers}, $o->{gtk_display_compssUsers}) = pkgs::readCompssUsers( - $o->{meta_class}, - -e '/tmp/compssUsers.pl' ? '/tmp/compssUsers.pl' : 'media/media_info/compssUsers.pl' - ); + load_rate_files($o); #- preselect default_packages and compssUsers selected. setDefaultPackages($o); diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index c1c9f33ba..7e826c514 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -229,6 +229,8 @@ sub reallyChooseGroups { gtkset_tip($tips, $check, $help); $check; }; + #- when restarting this step, it might be necessary to reload the compssUsers.pl (bug 11558). kludgy. + if (!ref $o->{gtk_display_compssUsers}) { install_any::load_rate_files($o) } gtkadd($w->{window}, gtkpack_($w->create_box_with_title(N("Package Group Selection")), 1, $o->{gtk_display_compssUsers}->($entry), |