From a0bc9e5238bfcb95218b634deef66c7561d6a1cb Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Tue, 14 Mar 2000 12:13:21 +0000 Subject: *** empty log message *** --- perl-install/install_any.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'perl-install/install_any.pm') diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index f4840f637..382e13c78 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -46,13 +46,13 @@ sub relGetFile($) { /\.img$/ and return "images/$_"; my $dir = m|/| ? "mdkinst" : /^(?:compss|compssList|compssUsers|depslist.*|hdlist.*)$/ ? "base/": "RPMS$asked_medium/"; $_ = "Mandrake/$dir$_"; - s/i386/i586/; + #- s/i386/i586/; avoid using such thing as package have to be correctly rebuild $_; } -sub errorOpeningFile($) { - my ($file) = @_; +sub errorOpeningFile($;$) { + my ($file, $absent) = @_; $file eq 'XXX' and return; #- special case to force closing file after rpmlib transaction. - $current_medium eq $asked_medium and return; #- nothing to do in such case. + $current_medium eq $asked_medium && !$absent and return; #- nothing to do in such case. $refused_media{$asked_medium} and return; #- refused forever... my $max = 32; #- always refuse after $max tries. @@ -92,7 +92,11 @@ sub getFile { *install_any::getFile = sub { http::getFile($_[0]) or errorOpeningFile($_[0]) }; } else { *install_any::getFile = sub { - open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return errorOpeningFile($_[0]); + #- try to open the file, but examine if it is present in the repository, this allow + #- handling changing a media when some of the file on the first CD has been copied + #- to other to avoid media change... + open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or + return errorOpeningFile($_[0], !(-e "/tmp/rhimage/" . relGetFile($_[0]))); *getFile; }; } -- cgit v1.2.1