diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-14 16:59:28 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-14 16:59:28 +0000 |
commit | a21ee6953348cc3a958673c5378c7c41fd7abda6 (patch) | |
tree | f17f990454fcf29d48ad2e10af02608dae063b11 /perl-install/install_any.pm | |
parent | 8b297e3f54f1bb1a14c205b7183b47a01aa16bae (diff) | |
download | drakx-backup-do-not-use-a21ee6953348cc3a958673c5378c7c41fd7abda6.tar drakx-backup-do-not-use-a21ee6953348cc3a958673c5378c7c41fd7abda6.tar.gz drakx-backup-do-not-use-a21ee6953348cc3a958673c5378c7c41fd7abda6.tar.bz2 drakx-backup-do-not-use-a21ee6953348cc3a958673c5378c7c41fd7abda6.tar.xz drakx-backup-do-not-use-a21ee6953348cc3a958673c5378c7c41fd7abda6.zip |
When re-using the rpmsrate and compssUsers.pl from a supplementary media,
always retrieve them locally in /tmp, instead of choosing the main install
method (this wasn't working for http installs)
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index f4aee9518..f37d7006e 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -239,6 +239,13 @@ sub getFile { } } || errorOpeningFile($f); } + +sub getLocalFile { + my ($file) = @_; + my $F; + open($F, $file) ? $F : do { log::l("Can not open $file: $!"); undef }; +} + sub getAndSaveFile { my ($file, $local) = @_ == 1 ? ("install/stage2/live$_[0]", $_[0]) : @_; local $/ = \ (16 * 1024); @@ -603,7 +610,7 @@ sub load_rate_files { pkgs::read_rpmsrate( $o->{packages}, $o->{rpmsrate_flags_chosen}, - getFile(-e "/tmp/rpmsrate" ? "/tmp/rpmsrate" : "media/media_info/rpmsrate") + -e "/tmp/rpmsrate" ? getLocalFile("/tmp/rpmsrate") : getFile("media/media_info/rpmsrate") ); ($o->{compssUsers}, $o->{gtk_display_compssUsers}) = pkgs::readCompssUsers( -e '/tmp/compssUsers.pl' ? '/tmp/compssUsers.pl' : 'media/media_info/compssUsers.pl' |