summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm30
-rw-r--r--perl-install/install_steps_gtk.pm2
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),